# Diffraction Grating Calculator

d·sinθ = mλ from lines/mm: spacing d, diffraction angle per order, and the m_max cap — HeNe and CD examples included.

> Canonical page: https://elysiatools.com/en/tools/diffraction-grating-calculator

- **Category:** Science & Education

- **Keywords:** diffraction grating, grating equation, groove density, diffraction order, wavelength, optics

## Overview

The Diffraction Grating Calculator computes grating spacing, diffraction angles, and maximum observable orders using the grating equation d·sinθ = mλ. Enter groove density in lines per millimeter, laser or light wavelength in nanometers, and your target diffraction order to determine precise beam angles and complete angular dispersion profiles for optical setups.

## Inputs

- **Groove density (lines/mm)** (number): e.g. 600
- **Wavelength λ (nm)** (number): e.g. 632.8
- **Diffraction order m** (number): e.g. 1

## When to use

- Aligning lasers, detectors, or sensors in an optical bench or spectroscopy experiment.
- Selecting appropriate grating groove densities to ensure target diffraction orders remain within observable physical limits.
- Analyzing spectral dispersion angles across visible or near-visible wavelengths for optical instrumentation.

## How it works

- Converts groove density (lines/mm) into grating spacing (d) in nanometers and micrometers.
- Calculates the diffraction angle (θ) for the selected order (m) using sinθ = mλ / d.
- Determines the highest physically observable diffraction order using m_max = ⌊d / λ⌋ and lists angles for all valid orders.

## Use cases

- Predicting diffraction spots for helium-neon (632.8 nm) and diode lasers in university physics laboratories.
- Calibrating optical spectrometers by matching known emission line wavelengths with measured diffraction angles.
- Evaluating surface track pitches on optical media, such as CDs and DVDs, acting as reflective diffraction gratings.

## Frequently asked questions

### What happens if sinθ exceeds 1 for a requested order?

If mλ exceeds grating spacing d, sinθ > 1 is physically impossible, meaning that diffraction order cannot exist or be observed.

### How is groove density converted to grating spacing?

Spacing d is the reciprocal of groove density: d = 1 / (lines per mm) converted to nanometers (e.g., 600 lines/mm gives 1666.67 nm).

### Does this calculator assume normal incidence?

Yes, calculations use the standard grating equation d·sinθ = mλ assuming light hits the grating perpendicular to the surface.

### What is the m = 0 order?

The m = 0 order represents the undiffracted central beam passing straight through or reflecting at 0° relative to normal incidence.

### Why are higher diffraction orders limited?

Diffraction orders are capped at m_max = ⌊d / λ⌋ because the angle θ cannot exceed 90 degrees.

## Related tools

- [Compton Scattering Calculator](https://elysiatools.com/en/tools/compton-scattering-calculator): Δλ = (h/m_e·c)(1 − cos θ) for X-ray photons: Compton wavelength, shifted wavelength/energy, recoil electron energy and angle, 0°/180° edge cases.
- [Wavefunction Expectation Value Calculator](https://elysiatools.com/en/tools/expectation-value-calculator): Trapezoidal ⟨x⟩, ⟨x²⟩, σ_x and ⟨ψ|ψ⟩ = ∫ψ²dx from pasted real ψ(x) samples — inner products for any discretely sampled wavefunction.
- [Maxwell Stress Tensor Calculator](https://elysiatools.com/en/tools/maxwell-stress-tensor): T_ij = ε₀(E_iE_j − ½E²δ_ij) + (1/μ₀)(B_iB_j − ½B²δ_ij) from the full E and B vectors, with the 3×3 matrix, energy densities, trace check, and traction on a chosen surface.
- [Optical Path Difference Calculator](https://elysiatools.com/en/tools/optical-path-difference): Optical path difference Δ = n·d and phase δ = 2π·Δ/λ₀, classifying interference as constructive, destructive, or intermediate, with an optional round-trip mode for thin films.
- [Particle in a Box Energy Levels](https://elysiatools.com/en/tools/particle-in-a-box): E_n = n²h²/(8mL²) for preset or custom particles: zero-point energy, level ladder to n = 12, λ_dB = 2L/n standing-wave check, transition photon wavelengths.
- [Planck Blackbody Radiation Calculator](https://elysiatools.com/en/tools/planck-radiation-calculator): B_λ(T), Wien peak λ_max = b/T, M_λ = πB_λ at the peak and at any wavelength, and the Stefan-Boltzmann total σT⁴.
- [Quantum Harmonic Oscillator Energy Levels](https://elysiatools.com/en/tools/quantum-harmonic-oscillator): E_n = (n + ½)ℏω from k + m, ω, or f: zero-point energy ½ℏω, equal spacing ħω, adjacent-transition photon wavelength, classical turning points, optional level ladder.
- [Relativistic Doppler Effect Calculator](https://elysiatools.com/en/tools/relativistic-doppler-effect): Longitudinal Doppler: redshift 1+z = √((1+β)/(1−β)) for receding sources, blueshift for approaching ones, with observed frequency, wavelength, and band labels.

## Samples

- [Copyright-Free MP3 Audio Samples](https://elysiatools.com/en/samples/mp3-samples): Collection of royalty-free audio samples for testing and development purposes including nature sounds, meditation music, and ambient audio
- [Copyright-Free WAV Audio Samples](https://elysiatools.com/en/samples/wav-samples): Uncompressed PCM WAV audio samples for testing and development, mirrored from MP3 set with nature sounds and meditation music
- [Copyright-Free Raw PCM Audio Samples](https://elysiatools.com/en/samples/pcm-samples): Raw PCM s16le audio samples featuring nature ambience and relaxing music for waveform, playback, and conversion workflows
- [Speech Learning & Safety Audio Samples](https://elysiatools.com/en/samples/audio-learning-safety-samples): Deterministic synthetic WAV inputs for pronunciation comparison, dictation preflight, alert degradation, and voice privacy tools.
