Hydrogen Spectrum Calculator Formula

Understand the math behind the hydrogen spectrum calculator. Each variable explained with a worked example.

Formulas Used

Wavelength

wavelength = 1 / (1.0974e7 * (1/pow(n_lower, 2) - 1/pow(n_upper, 2)))

Wavelength (nm)

wavelength_nm = 1 / (1.0974e7 * (1/pow(n_lower, 2) - 1/pow(n_upper, 2))) * 1e9

Photon Energy

photon_energy = 13.6 * (1/pow(n_lower, 2) - 1/pow(n_upper, 2))

Variables

VariableDescriptionDefault
n_lowerLower Level (n1)2
n_upperUpper Level (n2)3

How It Works

Hydrogen Spectral Lines (Rydberg Formula)

When an electron transitions between energy levels in hydrogen, it emits or absorbs a photon with a specific wavelength.

Formula

1/lambda = R_H * (1/n1^2 - 1/n2^2)

  • *R_H* = 1.0974 x 10^7 m^-1 (Rydberg constant)
  • *n1* = lower energy level
  • *n2* = upper energy level (n2 > n1)
  • Series: Lyman (n1=1, UV), Balmer (n1=2, visible), Paschen (n1=3, IR).

    Worked Example

    H-alpha line: n1 = 2 to n2 = 3 (Balmer series).

    n_lower = 2n_upper = 3
    1. 011/lambda = R * (1/4 - 1/9)
    2. 021/4 - 1/9 = 5/36 = 0.1389
    3. 031/lambda = 1.0974e7 * 0.1389 = 1.524e6 m^-1
    4. 04lambda = 6.563e-7 m = 656.3 nm (red)

    Frequently Asked Questions

    Why does hydrogen produce discrete spectral lines?

    Because electron energy levels are quantised. Only specific energy differences are allowed, producing photons at discrete wavelengths.

    What is the Balmer series?

    Transitions ending at n = 2. These fall in the visible spectrum: H-alpha (656 nm, red), H-beta (486 nm, blue-green), H-gamma (434 nm, violet).

    Does this formula work for other elements?

    For hydrogen-like ions (one electron), multiply R_H by Z^2. For multi-electron atoms, the Rydberg formula does not apply directly.

    Ready to run the numbers?

    Open Hydrogen Spectrum Calculator