Diffraction Grating Calculator

Created by Bogna Szyk
Last updated: Oct 10, 2022

This diffraction grating calculator will help you find out what happens when the light hits a structure with multiple openings (slits or rulings). The light ray gets diffracted in various directions. Our tool determines the paths that light takes with the use of a simple diffraction grating formula.

💡 Keep reading to learn how diffraction works, or take a look at the Snell's law calculator if you're interested in other optics phenomena.

What is diffraction?

Diffraction is a wave phenomenon that happens when a light ray hits an obstacle or a slit. After the light has traveled through the aperture, it changes its direction, what usually results in the wave spreading out.

waves creating a diffraction pattern

What is diffraction grating?

Diffraction grating happens when the light hits an obstacle with uniformly distributed apertures. Then, the rays get diffracted — each of them goes in a slightly different direction.

The effects of diffraction are only visible if the spacing between apertures is larger than the wavelength of the incident ray.

Diffraction grating equation

diffraction grating diagram

If the incident light ray is perpendicular to the grating, you can use the following diffraction grating equation to find the directions in which the rays are diffracted:

a×λ=d×sin(θa)a \times \lambda = d \times \sin(\theta_a)


  • λλ is the wavelength of the incident ray;
  • dd is the grating spacing;
  • θa\theta_a is the angle between the initial and diffracted direction of light for ray aa; and
  • aa is a positive non-zero integer that represents the order of the diffracted image. a=1,2,3...a = 1, 2, 3...

If the incident ray meets the apertures at an angle θo\theta_o, you also need to include it in your calculations:

a×λ=d×(sin(θo)+sin(θa))a \times \lambda = d \times \left(\sin(\theta_o) + \sin(\theta_a)\right)

For example, for the ray incident at the angle of 30° (sin30=0.5\sin 30^\circ = 0.5), the equations for first three diffracted images will have the following form:

You can calculate the directions manually or use this diffraction grating calculator to do it for you!

λ=d×(0.5+sin(θ1))2λ=d×(0.5+sin(θ2))3λ=d×(0.5+sin(θ3))\begin{aligned} λ &= d \times \left(0.5 + \sin(\theta_1)\right) \\ 2λ &= d \times \left(0.5 + \sin(\theta_2)\right) \\ 3λ &= d \times \left(0.5 + \sin(\theta_3)\right) \end{aligned}
Bogna Szyk
Grating density
Angle of incidence
Diffracted images
First order
Second order
Third order
Fourth order
Fifth order
Check out 22 similar waves calculators 🔊
Acoustic impedanceAlfvén velocityBeat frequency… 19 more
People also viewed…

Belt length

The belt length calculator will tell you the length of a belt spread out between two pulleys.

Car heat

The hot car calculator shows you how fast the interior of a car heats up during a summers day.

Grams to cups

The grams to cups calculator converts between cups and grams. You can choose between 20 different popular kitchen ingredients or directly type in the product density.

Rydberg equation

You can find the line spectrum of hydrogen-like atoms with this Rydberg equation calculator.
Copyright by Omni Calculator sp. z o.o.
Privacy policy & cookies
main background