We examine five different methods to estimate an earthquake's magnitude using only P wave data for use in earthquake early warning systems. We test two input parameters: the maximum predominant period of the P wave (τpmax) and the displacement amplitude of the P wave's vertical component (Pd). We apply our algorithms to 174 earthquakes 3.0 < M < 8.0 from California and Japan that have also been used in previous calibration studies. We also apply them to 1992 0.2 < M < 5.7 earthquakes that were processed by the real-time Earthquake Alarm Systems in California. We find that τpmax does not scale with magnitude for small earthquakes (M < 3) and is less accurate for large-magnitude earthquakes than using Pd alone. We derive a global scaling relation between Pd and magnitude and conclude that this global relationship provides the most accurate and robust magnitude estimate. This relationship could be applied in earthquake source zones around the world.