Index of Refraction Calculator

Find the refractive index from light speed or from Snell angles, plus speed, time per meter and the critical angle.

Physics and EnergyUpdated 2026-11-184 min read
Index of Refraction Calculator
Positive and no greater than c = 299792458 m/s.
Positive and no greater than 670616629.4 mph, the vacuum value.
Measured from the normal, not from the surface.
Smaller than the incident angle for a material denser than air.
Index of refraction
...
Light speed in the material...
Time per unit length...
Critical angle to air...

What it does

Refraction is the change of direction when light passes from one material into another. The size of that bend is set by one number, the index of refraction. OpenStax defines it as the vacuum speed divided by the speed inside the material, so light slowed to 225 million m/s gives an index near 1.33.

An index is a ratio and carries no units. Vacuum has exactly 1 because the speed in the numerator and the denominator is the same. Air rounds to 1.000 in most problems, water sits near 1.333 and crown glass near 1.52. A higher number always means a slower ray inside the material, never a faster one.

There are two direct ways to measure the number. If you know the speed in the material, divide c by it. If you can send a ray through a slab and read the incident and refracted angles from the normal, Snell's law with air as the first medium reduces to n = sin i / sin r. OpenStax works a 30 degree and 22 degree pair and arrives near 1.33, the index of water.

This page handles both routes. Speed mode accepts m/s or mph, so one physical speed yields the same index whichever unit system you choose. Angle mode takes degrees and rejects a pair that would give an index below 1 for an ordinary material. Alongside the main answer the tool reports the light speed in your units, the time to cross a set length and the critical angle for total internal reflection back into air.

Real indices shift with wavelength, and crystals can split a ray into two with different indices. The values here describe one color in one uniform, nonabsorbing material. Treat the output as a clean model for homework and quick estimates rather than a substitute for a material datasheet.

How to use

  1. Choose Light speed in the material if you know v, or Snell incident and refracted angles if you measured i and r.
  2. Pick metric for m/s or imperial for mph. The index itself does not depend on that choice.
  3. In speed mode enter a positive light speed that is no greater than vacuum c.
  4. In angle mode enter the incident angle in air and the refracted angle in the material, both measured from the normal.
  5. Read the index of refraction as the main result, then check the speed and travel time shown in your units.
  6. Use the critical angle to judge whether a ray inside the material can escape into air.

Formula

n = c / v, with c = 299792458 m/s and v the light speed in the material. In Snell mode with air as medium 1, n = sin i / sin r. Critical angle to air is theta_c = asin(1 / n).
n
Index of refraction of the material, a pure number.
c
Speed of light in vacuum, 299792458 m/s, exact by SI definition.
v
Speed of light inside the material, in m/s or converted from mph.
i
Incident angle in air, in degrees from the normal.
r
Refracted angle in the material, in degrees from the normal.
theta_c
Critical angle in degrees, where a ray in the material would skim the surface into air.

Both routes must agree: once you have n, the speed is c / n, and sin i / sin r must return that same n. Vacuum gives n = 1 and a critical angle of 90 deg. The mph conversion uses 1 mph = 0.44704 m/s exactly, and the time per length is 1 / v written as ns per meter or ns per foot. Angles are measured from the perpendicular to the surface, not from the surface itself.

Worked example

Example: a ray slowed to 225000000 m/s

Defaults: speed mode, metric units and v = 225000000 m/s. Vacuum c = 299792458 m/s comes from NIST.

  1. Write the known speed: v = 225000000 m/s, which is below c.
  2. Divide c by v: 299792458 / 225000000 = 1.3324109.
  3. Round to four decimals: n = 1.3324, close to water.
  4. Convert the speed: 225000000 / 0.44704 = 503310665.7 mph and 299792458 / 0.44704 = 670616629.4 mph, so the ratio is still 1.3324.
  5. Time per meter: 1 / 225000000 s = 4.4444 ns, displayed as 4.444 ns/m.
  6. Critical angle: asin(1 / 1.3324) = 48.64 deg, so a ray inside the material can escape only below that angle.
  7. The tool shows 1.3324, 2.25e8 m/s, 4.444 ns/m and 48.64 deg.

Reference table

Index, travel time and critical angle for sample light speeds
Light speed (m/s)Index nTime per meterCritical angle
299792458 (vacuum)13.336 ns/m90.00 deg
225000000 (default)1.33244.444 ns/m48.64 deg
2000000001.4995 ns/m41.85 deg
1500000001.99866.667 ns/m30.02 deg

Limits

  • One wavelength at a time: real indices change with color, so a value measured in red light will not be exact in blue.
  • Assumes a uniform, nonabsorbing material. Absorption gives a complex index that this simple ratio cannot show.
  • In angle mode the first medium is fixed at air with n = 1. Two arbitrary media need the full Snell relation.
  • No birefringence. In a crystal each polarization can have its own index and its own refracted ray.

Common mistakes

  • Entering km/s in the m/s box, which makes the index about 1000 times too small.
  • Measuring the angle from the surface instead of the normal. Snell angles use the perpendicular.
  • Putting the larger angle in the refracted box when light goes from air into glass, which gives an index below 1.
  • Assuming a higher index means faster light. A higher n always means a slower ray.
  • Mixing a speed in mph with vacuum c in m/s. The engine converts both to one unit before dividing.

Try it yourself

Quick checks. Answers sit tucked under each question.

Light travels at 150000000 m/s in a liquid. What index, time per meter and critical angle does the tool show?

n = 299792458 / 150000000 = 1.9986. The time is 1 / 150000000 s = 6.667 ns/m and the critical angle is asin(1 / 1.9986) = 30.02 deg.

A ray in air hits at 45 deg and refracts to 28 deg. What index and speed come out?

n = sin 45 / sin 28 = 0.70711 / 0.46947 = 1.5062. The speed is 299792458 / 1.5062 = 1.9904e8 m/s and the critical angle is 41.60 deg.

Does entering 503310666 mph change the answer from the worked example?

No. Multiplying by 0.44704 gives 225000000.1 m/s, so n stays 1.3324. The speed line reads 5.0331e8 mph and the time line reads 1.355 ns/ft.

Questions

What is the index of refraction?

The ratio of the speed of light in vacuum to its speed in a material. It is a pure number, at least 1 for ordinary matter, and it sets how much a ray bends at a boundary.

Why is the index of vacuum exactly 1?

Because the speed in the material and the reference speed are both 299792458 m/s, so the ratio is one. Air is close enough that most problems take it as 1.

Can I use the angle mode for light going from glass into air?

Not with this page. It fixes the first medium as air with n = 1. For a dense to light boundary the refracted angle is larger than the incident angle, so the ratio would come out below 1.

What is the critical angle good for?

It is the largest incident angle inside a material that still lets a ray escape into air. Past that angle the ray is totally internally reflected, which is how optical fibers guide light.

Why do I get the same index in m/s and mph?

Because n is a ratio of speeds. Both the material speed and c are converted to the same unit before dividing, so the units cancel.

Does the tool account for color?

No. You enter one speed or one pair of angles and get one index for that measurement. Use a value quoted at the wavelength you care about, since dispersion changes n slightly with color.

Sources

How this page was checked. The formula above was matched against the cited sources, and the worked example was run through the tool on this page before publishing. If you spot an error, contact us so we can fix it and note the correction.