Every calculator on this site runs one of the formulas below, in your browser, with the constants listed here. The code is one small file you can read.
Constants
| Quantity | Value | Note |
|---|---|---|
| Speed of light in vacuum, c | 299,792,458 m/s | exact by definition |
| Planck constant, h | 6.62607015 × 10-34 J s | exact (2019 SI) |
| Electronvolt | 1.602176634 × 10-19 J | exact |
| hc | 1239.84 eV nm | derived; the photon-energy shortcut |
| Electron mass | 9.1093837015 × 10-31 kg | CODATA 2018 |
| Proton mass | 1.67262192369 × 10-27 kg | CODATA 2018 |
| Neutron mass | 1.67492749804 × 10-27 kg | CODATA 2018 |
Wavelength and frequency
v = f × λ, so λ = v / f and f = v / λ.
For light and radio, v is c divided by the refractive index of the medium: vacuum 1, air 1.000293, water 1.333, crown glass 1.52, diamond 2.417. These are visible-light values and vary slightly with wavelength. For sound the calculator uses 343 m/s in air at 20 °C, 1480 m/s in water and 5960 m/s in steel. The spectrum band shown is judged on the vacuum wavelength, because frequency is what stays fixed when a wave enters a medium.
Example: 100 MHz in vacuum, λ = 299,792,458 / 100,000,000 = 2.998 m.
Photon energy
E = h f = h c / λ. With λ in nanometres, E(eV) = 1239.84 / λ.
Example: 532 nm gives 1239.84 / 532 = 2.33 eV, or 3.73 × 10-19 J.
de Broglie wavelength
λ = h / (m v), the non-relativistic form. The calculator flags speeds above 0.1 c, where relativistic momentum should replace m v, and refuses speeds at or above c. It does not compute the relativistic value.
Example: an electron at 1,000,000 m/s, λ = 6.626 × 10-34 / (9.109 × 10-31 × 106) = 7.27 × 10-10 m = 0.727 nm.
Antenna lengths
Free-space half wavelength is (c / f) / 2. The dipole length is that figure multiplied by a velocity factor, default 0.95, which accounts for end effect in thin wire. Each leg is half the dipole; the quarter-wave vertical equals one leg; the full wave is twice the dipole.
In feet with f in MHz, the free-space half wave is 492 / f and the 0.95-shortened dipole is about 468 / f, the figure most amateur-radio references quote.
Example: 146 MHz, free-space half wave 1.027 m, dipole 0.976 m (3.20 ft), each leg 0.488 m. Real antennas are cut slightly long and trimmed for lowest SWR.
Spectrum bands
Radio above 1 m; microwaves 1 mm to 1 m; infrared 750 nm to 1 mm; visible 380 to 750 nm (violet 380-450, blue 450-495, green 495-570, yellow 570-590, orange 590-620, red 620-750); ultraviolet 10 to 380 nm; X-rays 10 pm to 10 nm; gamma below 10 pm. A boundary value belongs to the longer-wavelength band (750 nm reads as infrared, 10 nm as ultraviolet). These are conventions; different references draw them slightly differently.
Units and rounding
Everything is computed in SI and converted for display. Results show four significant figures; the field that echoes your input shows six. The display unit is chosen so the number falls between 1 and 1000 where possible.
Checking the code
All formulas live in /source/physics.js and each has an automated test. If a result looks wrong, tell us with the inputs you used.