Diffraction Grating Calculator
This is an online calculator that calculates the Diffraction Angle of various orders of diffraction when light hits a structure with multiple openings (slits or rulings). Just enter the Wavelength, Grating Density, and the Angle of Incidence to get the corresponding Diffraction Angle value.
Special notes:
- Consider an example given below,
Angle of incidence = 30o, Wavelength of incident light = 560 nm, and Grating density = 1000 lines/nm.
The true value, for example, of the second order diffraction should be 38.55 degrees, but the above calculator shows a value of 38.31613447 degrees. The variation of 0.23386 degrees in the result occurs due to the conversion factor of (π/180) and (180/ π) used to create this calculator.
- If first and second order results are present, and the results for orders 3, 4, and 5 are all 1, it implies that the given inputs doesn't have higher orders available.
Diffraction grating is an optical device characterized by a periodic structure that disperses light into multiple beams, each traveling in distinct directions. It serves as an alternative to prisms for observing spectra. Typically, when light encounters the grating, it splits, producing maxima at specific angles, denoted as θ. The diffraction grating formula is employed to determine these angles.

Consider two rays that emerge making the angle θ with the straight through the line. These rays will constructively interference when the difference in their two path lengths is an integral multiple of their wavelength λ, i.e.,

where n = 1, 2, 3, … is the order of diffraction and d is the grating spacing.
This is known as the DIFFRACTION GRATING EQUATION.
If the incident ray meets the apertures at an angle θi, then the above equation can be rewritten as,

where

The diffraction angle for various orders of diffraction can be calculated by putting the values for n in eq (1).
For first order diffraction, n=1, so we get,

So the first order diffraction angle θ1 is,

Similarly we can write other order diffraction angles as,
