Diffraction Grating Wavelength Calculator

Turn grating readings into accurate wavelengths fast. Enter angles or screen geometry, plus any unit. Download CSV and PDF summaries for lab notes easily.

You can compute any variable from the others.
For screen geometry: θ = arctan(y/L).
Usually 1, 2, or 3 for visible light.
Used when “Direct angle θ” is selected.
Sine uses radians internally.
Distance from grating to screen.
Distance from central maximum to bright line.
If provided, spacing is computed as d = 1/N.
Use this when you know spacing directly.
Required when solving for angle, spacing, or order.
Reset Result appears above this form after you calculate.

Example Data Table

Example values below assume screen geometry, first order, and a common grating.
Line density (lines/mm) Order (m) Screen distance L (m) Offset y (m) Estimated λ (nm)
60011.000.36~600
100011.500.55~520
120011.200.47~530
60021.000.36~300
30012.000.30~480

Formula Used

The grating condition for normal incidence is:

d · sin(θ) = m · λ

If you measure geometry on a screen, the angle can be estimated by:

θ = arctan(y / L)

When line density N is given (for example lines/mm), spacing is:

d = 1 / N (after converting N to lines per meter)

How to Use This Calculator

  1. Choose what you want to solve for in the first dropdown.
  2. Select an angle method: direct θ, or screen geometry y and L.
  3. Enter grating information using either spacing d or line density N.
  4. Provide the remaining known values, including order m when needed.
  5. Press Calculate to show results above the form.
  6. Use CSV or PDF buttons to save the computed summary.

Tip: Keep y and L in the same length unit for cleaner input.

Diffraction Grating Wavelength Guide

1) Why gratings help measure wavelength

A diffraction grating spreads light into maxima at well-defined angles. With known spacing and order, the measured angle maps directly to wavelength. This calculator streamlines the geometry and unit handling, helping you compare readings from gratings, screen distances, and measurement units quickly.

2) Line density versus spacing

Gratings are labeled by line density, commonly 300, 600, 1000, or 1200 lines/mm. Some catalogs use grooves/mm or lines/inch. Spacing is the inverse: d = 1/N after converting N to lines per meter. Higher density produces larger angles for the same wavelength, giving better separation on a screen.

3) Picking a practical diffraction order

First order (m=1) is brightest and simplest to identify. Second order (m=2) increases spread but is dimmer and can overlap colors, especially with broadband sources. A blazed grating may favor one order. Always check feasibility: m·λ ≤ d; if not, no real diffraction angle exists.

4) Getting θ from screen measurements

When using a screen, measure offset y from the central maximum and distance L from grating to the screen plane (not from the laser). Then θ = arctan(y/L). Small-angle shortcuts can mislead at larger offsets, so arctan is safer. Keep y and L in the same unit.

5) Useful wavelength reference values

Visible light spans about 380–700 nm. Many common sources cluster near 405 nm (violet), 532 nm (green), and 633–650 nm (red). With 600 lines/mm in first order, these often land at angles that fit comfortably on a 1–2 m setup. UV or IR measurements may need sensors beyond the eye.

6) What controls accuracy

Uncertainty usually comes from locating the brightest peak, ruler resolution for y, and alignment. Measure both left and right maxima and average the angle to reduce tilt error. A goniometer can improve θ when available. Increasing L makes y larger, improving measurement resolution, but requires screen area.

7) Quick sanity checks

Unexpected results typically trace to unit mistakes (lines/cm vs lines/mm), the wrong order, or measuring the wrong bright line. Very large θ values may indicate you captured a higher order. Also confirm sin(θ) stays within −1 to 1. This page assumes normal incidence; a tilted beam shifts the pattern.

FAQs

1) What does “lines/mm” mean?

It is the number of grating lines packed into one millimeter. Converting to lines per meter (multiply by 1000) lets you compute spacing using d = 1/N.

2) Why does the diffraction order m matter?

Each order corresponds to a different constructive-interference condition. Higher m gives larger angles for the same wavelength, but peaks get dimmer and may overlap with other colors.

3) Can I input the angle in degrees?

Yes. Choose degrees in the angle unit dropdown. The calculator converts degrees to radians internally before evaluating sine and arctangent relationships.

4) Why do I get “no real solution”?

It happens when m·λ is larger than d, making sin(θ) greater than 1. Reduce the order, check line density units, or verify your measured angle/geometry.

5) How do I convert line density into spacing?

Convert N to lines per meter, then d = 1/N. For example, 600 lines/mm = 600,000 lines/m, so d ≈ 1.667×10⁻⁶ m.

6) Does this work if the beam hits the grating at an angle?

This page assumes normal incidence. For oblique incidence, the condition becomes d(sin θ ± sin α) = mλ, where α is the incidence angle.

Related Calculators

relative frequency calculatorresonant frequency calculatorwavelength to frequency calculatorperiod to frequency calculatorcumulative frequency calculatortime to frequency calculatorfrequency absorption calculatorantenna length to frequency calculatorangular frequency calculatoraudio frequency calculator

Important Note: All the Calculators listed in this site are for educational purpose only and we do not guarentee the accuracy of results. Please do consult with other sources as well.