Use this index of refraction calculator to find refractive index (n) from light speed in a material, or find light speed from n. You can also use Snell’s law to solve for an unknown angle or refractive index and see when total internal reflection happens.
Advanced options
How to use our Index of Refraction Calculator
- Choose a mode in "What do you want to calculate?" (speed-based or Snell's law).
- If you picked "Refractive index (n) from speed", enter the light speed in the medium (m/s).
- If you picked "Light speed in the medium from refractive index", enter refractive index (n).
- If you picked a Snell's law mode, enter the two refractive indices (n1 and n2) and the angle(s) you know.
- Open "Advanced options" to confirm your angle unit (degrees or radians) and whether your angles were measured from the normal or from the surface.
- If you measured from the surface, select that option so the calculator can convert to the normal angle for Snell's law.
- Optional: use the preset picker to fill a typical n value, and enter wavelength (nm) and temperature (C) as context notes.
- Click "Calculate" to see results, including a status note and (when applicable) the critical angle.
Definitions
Refractive index (n): A unitless ratio that compares light speed in vacuum to light speed in a material (medium). Bigger n means light travels slower in that material. [1]
Vacuum: Empty space. In basic optics, the refractive index of vacuum is exactly 1.
Medium: The material light is traveling through, like air, water, or glass. [2]
Angle from the normal: The angle measured from a line perpendicular to the surface. Snell's law uses this angle. [3]
Total internal reflection: When light tries to go from higher n to lower n at a large enough incidence angle, and no real refracted angle exists. [3]
Critical angle: The incidence angle (from the normal) where the refracted angle would be 90 degrees. Larger incidence angles can cause total internal reflection (only when n1 is greater than n2). [3]
Methodology
1) Speed and refractive index
We use the definition of absolute refractive index as a speed ratio. [1]
n = c / v
v = c / n
Where c is the speed of light in vacuum (default 299,792,458 m/s) and v is the light speed in the medium.
2) Snell's law (refraction at a surface)
Snell's law relates the two indices and the two angles (measured from the normal). [3]
n1*sin(theta1) = n2*sin(theta2)
If the user says their angles are measured from the surface, we convert to normal angles first:
theta_normal = 90 degrees - theta_surface
If angle unit is radians, the conversion uses:
theta_normal = (pi/2) - theta_surface
3) Solving for the unknown in Snell's law
When solving for an angle, trig functions are computed in radians internally (degrees are converted using pi/180), and results are converted back to degrees for display.
theta2 = arcsin((n1/n2)*sin(theta1))
theta1 = arcsin((n2/n1)*sin(theta2))
When solving for an index, rearrange Snell's law:
n2 = n1*sin(theta1)/sin(theta2)
n1 = n2*sin(theta2)/sin(theta1)
If the needed sine in the denominator is 0, the ratio is undefined, so the solved value is shown as N/A with an error message explaining what to change.
4) Total internal reflection and critical angle
Total internal reflection is detected when the arcsin input would be outside [-1, 1], so no real refraction angle exists. [3]
k = (n1/n2)*sin(theta1)
if abs(k) > 1, then: no real theta2 (total internal reflection)
When n1 is greater than n2, we also compute the critical angle:
theta_c = arcsin(n2/n1)
The calculator reports theta_c in degrees and adds a status note explaining that incidence angles larger than theta_c can cause total internal reflection.
5) Validation and formatting rules
Required fields cannot be blank. Speeds must be greater than 0. Refractive index must be greater than 0 for this basic model. In Snell modes, angles must be between 0 and 90 degrees (or 0 and pi/2 radians) after any surface-to-normal conversion. Speed outputs are formatted with commas and no scientific notation; n is shown up to 6 decimals (trim trailing zeros); angles are shown up to 2 decimals (trim trailing zeros).