🔬
🔬 Science & engineering

Diffraction Grating Calculator (angle of each order, d sin θ = mλ)

Results update as you type.

Your numbers

Understanding the diffraction grating calculator — concept and principle

A diffraction grating splits light into bright spots at specific angles that depend on the wavelength. This calculator finds the diffraction angle for a chosen order, the spot's position on a screen and how many orders appear.

Green laser through 600 lines/mmGreen laser through 600 lines/mmGreen laser through 600 lines/mmline spacing d1.6667 µmwavelength λ532 nmsin θ = mλ ÷ d = 0.319218.61°33.68 cm off centre at 1 m · 7 spots (m up to 3)
Light from neighbouring slits adds up where the path difference is one wavelength: θ = 18.61° for the first order.

How it is calculated

The principle

Light from neighbouring slits travels slightly different distances to a point on the screen. Where the path difference d sin θ equals a whole number of wavelengths, the waves arrive in step and reinforce each other, producing a bright spot. With many slits the spots become very sharp, which is why gratings are used in spectrometers to separate wavelengths precisely. Because sin θ cannot exceed 1, only a limited number of orders exist.

Worked example

Default inputs: 600 lines/mm, λ = 532 nm (green laser), first order, screen at 100 cm.

  1. d = 1 ÷ 600 mm ≈ 1.6667 µm.
  2. sin θ = 1 × 0.532 ÷ 1.6667 ≈ 0.3192, so θ ≈ 18.61°.
  3. Spot position = 100 × tan 18.61° ≈ 33.68 cm from the centre.
  4. Highest order = floor(1.6667 ÷ 0.532) = 3; spots in total = 2 × 3 + 1 = 7.
How Diffraction angle θ (°) changes with Grating lines per millimetreHow Diffraction angle θ changes with Gra…0102030401503004506007509001,200Example: 18.61Grating lines per millimetre
Each point is the calculator re-run with only “Grating lines per millimetre” changed; the gold point is the default example. Change the inputs above and this chart follows your numbers.
Grating lines per millimetreDiffraction angle θ (°)
1504.58
3009.18
45013.85
60018.61
75023.52
90028.61
1,20039.67

How to read the result

Longer wavelengths diffract to larger angles, so white light spreads into a spectrum with red farthest out. Higher line densities give larger angles and better wavelength separation but fewer orders. Measuring y and L lets you work backwards to find an unknown wavelength.

Common mistakes

Keep in mind: Never look into a laser beam or its reflections. Use eye protection suited to the laser's class.

Frequently asked questions

What is the grating equation?

d sin θ = mλ for light hitting the grating straight on.

How many orders can a grating produce?

All whole numbers m up to d ÷ λ, on both sides of the centre, plus the central spot.

How do I find wavelength with a grating?

Measure the angle (or y and L), then λ = d sin θ ÷ m.

Sources: Hecht, E., Optics, 5th ed. Pearson (diffraction gratings) · OpenStax, University Physics Volume 3, Section 4.4 Diffraction Gratings

Checked 9 Nov 2026. OpenStax, University Physics Volume 3 (2016), §4.4 “Diffraction Gratings”: d sin θ = mλ (m = 0, ±1, ±2 …), d = distance between slits (10,000 lines per centimetre → d = 1/10,000 cm).

🔬 All science & engineering tools →🌍 Calculators by country →