Back to Blog

    Diffraction Grating Calculator: Wavelength from ...

    Physics2026-03-127 min read

    Calculate the wavelength of light or the grating spacing using the diffraction grating equation. Used in spectroscopy, laser optics, and wavelength analysis.

    Share:

    What is a Diffraction Grating?

    A diffraction grating is an optical component with a large number of parallel, equally spaced slits (or grooves). When light passes through, each slit acts as a wave source, and the resulting interference pattern separates the light into its component wavelengths. This is the basis for spectrometers — instruments that measure the spectrum of light.

    🌈 Diffraction Grating Calculator

    Use our free calculator for instant, accurate results.

    Calculate Now →

    📐 Formula

    d × sin(θ) = m × λ

    d = grating spacing (m), θ = diffraction angle, m = order (integer: 1, 2, 3...), λ = wavelength (m).

    📝 Worked Example

    A grating has 500 lines/mm → d = 1/500,000 = 2×10⁻⁶ m
    First order (m=1) maximum at θ = 15°:
    λ = d×sin(θ)/m = 2×10⁻⁶ × sin(15°) = 517 nm (green light)

    📝 How to Use the Calculator

    1
    Enter Grating SpecificationInput lines per mm or grating spacing d in nm.
    2
    Enter Diffraction OrderUsually m=1 (first order) for brightest maximum.
    3
    Enter Angle or WavelengthProvide either to calculate the other.
    4
    View ResultsSee the corresponding wavelength and color of visible light if applicable.

    ❓ FAQ

    What is the difference between a diffraction grating and a prism?

    Both separate white light into a spectrum, but a grating uses interference while a prism uses refraction. Gratings provide linear dispersion and are more useful in spectroscopy.

    What does "lines per mm" mean on a grating?

    It specifies how many slits (grooves) exist per millimeter. More lines = smaller d = greater angular dispersion.


    Veer Kumavat

    Veer Kumavat

    Founder & Author

    Veer is a 14-year-old student from Nashik, Maharashtra, who built SciFi Calculators to help students worldwide master STEM subjects. He is passionate about making complex science and math problems accessible through intuitive digital tools.