Refractive Index Calculator
Calculates the angle of refraction using Snell's law (n₁sinθ₁=n₂sinθ₂), finds the refractive index from speed or wavelength measurements, and determines the critical angle for total internal reflection — with full step-by-step working and a real-time ray diagram updating as you type.
⚡ Snell's Law — Law of Refraction
All angles measured from the normal (perpendicular to interface) — NOT from the surface itself
Total internal reflection occurs when light travels from denser → less dense medium (n₁ > n₂) and the angle of incidence exceeds the critical angle θc = arcsin(n₂/n₁).
The refractive index n = c/v, where c = 2.99792458×10⁸ m/s (speed of light in vacuum) and v is the speed of light in the material.
The refractive index n = λ_vacuum / λ_medium. Frequency stays constant during refraction; wavelength shortens.
Measure the refractive index experimentally using Snell's law. Enter known medium (n₁), angle of incidence, and measured angle of refraction.
All refractive indices at 589 nm (sodium D-line), standard reference temperature. Click any row to load that material into Snell's Law calculator.
| Material | n | Notes |
|---|---|---|
| Vacuum | 1.00000 | Exact — by definition |
| Air (STP) | 1.00029 | Standard temperature & pressure |
| Air (room temp) | 1.00027 | ~20°C, 1 atm |
| Carbon dioxide | 1.00045 | STP |
| Material | n | Notes |
|---|---|---|
| Water (20°C) | 1.3330 | Most common liquid |
| Water (0°C) | 1.3340 | Near freezing |
| Ethanol | 1.3610 | Alcohol |
| Glycerin | 1.4730 | High viscosity |
| Olive oil | 1.4670 | Vegetable oil |
| Benzene | 1.5011 | Aromatic hydrocarbon |
| Carbon disulfide | 1.6280 | High-dispersion solvent |
| Carbon tetrachloride | 1.4610 |
| Material | n | Notes |
|---|---|---|
| Crown glass | 1.5200 | Common optical glass |
| Flint glass | 1.6200 | High-dispersion glass |
| Borosilicate glass | 1.4740 | Pyrex/lab glass |
| Fused silica (quartz) | 1.4584 | UV-transparent |
| Material | n | Notes |
|---|---|---|
| Diamond | 2.4170 | Highest natural n; θc=24.4° |
| Sapphire | 1.7620 | Al₂O₃ |
| Cubic zirconia | 2.1500 | Diamond simulant |
| Ice | 1.3090 | H₂O solid |
| Rock salt (NaCl) | 1.5440 | |
| Calcite (ordinary) | 1.6580 | Birefringent |
| Fluorite (CaF₂) | 1.4340 | UV optics |
| Rutile (TiO₂) | 2.9070 | Very high n |
| Material | n | Notes |
|---|---|---|
| Acrylic / PMMA / Lucite | 1.4910 | Plexiglass |
| Polycarbonate | 1.5860 | Safety lenses |
| Polystyrene | 1.5900 | |
| Polyethylene | 1.5000 |
| Material | n | Notes |
|---|---|---|
| Silicon | 3.9600 | Infrared optics |
| Germanium | 4.0000 | IR lenses |
| Gallium arsenide | 3.6000 | Laser diodes |
| Component | n | Notes |
|---|---|---|
| Cornea | 1.3760 | Main refracting surface |
| Crystalline lens | 1.3860 | Average; gradient structure |
| Vitreous humor | 1.3360 | Gel-like interior |
Snell's Law — The Angle of Refraction Formula
This refractive index calculator solves Snell's law (n₁sinθ₁=n₂sinθ₂) for any unknown variable — angle of refraction, angle of incidence, or either refractive index — and determines the critical angle for total internal reflection, with real-time ray diagram.
Snell's law describes how light bends when crossing the boundary between two media with different refractive indices:
Critical rule for the angle of refraction formula: ALL angles in Snell's law — both θ₁ and θ₂ — are measured from the normal (the line perpendicular to the interface), NOT from the surface itself. This is the most common source of errors in refraction problems.
Solving for the angle of refraction: θ₂ = arcsin(n₁ × sinθ₁ / n₂). When light enters a denser medium (n increases), the angle decreases — light bends toward the normal. When entering a less dense medium, the angle increases — light bends away from the normal.
Memory aid for Snell's law: "Dense medium = small angle." Entering a material where light slows down (higher n) means the ray compresses toward the normal. The Snell law equation n₁sinθ₁=n₂sinθ₂ enforces this — if n₂ > n₁, then sinθ₂ < sinθ₁, so θ₂ < θ₁.
How to Calculate the Angle of Refraction — Step-by-Step
Four-step method to find the angle of refraction using the angle of refraction formula:
- Identify n₁, n₂, and θ₁ — find refractive indices from tables; measure θ₁ from the normal (not the surface)
- Compute n₁×sinθ₁ — this product is conserved across the interface (Snell's invariant)
- Divide by n₂ to get sin(θ₂): sin(θ₂) = n₁sinθ₁/n₂
- Apply arcsin to find θ₂. If sin(θ₂) > 1: total internal reflection occurs, no refracted ray exists
Example 1 — Air → Water: θ₁ = 30°
- n₁ = 1.000 (air), n₂ = 1.333 (water), θ₁ = 30°
- n₁sinθ₁ = 1.000 × sin(30°) = 1.000 × 0.5000 = 0.5000
- sin(θ₂) = 0.5000 / 1.333 = 0.37509
- θ₂ = arcsin(0.37509) = 22.03° (bends toward normal — entering denser medium)
Example 2 — Air → Diamond: θ₁ = 45°
- n₁ = 1.000, n₂ = 2.417, θ₁ = 45°
- sin(θ₂) = 1.000 × sin(45°) / 2.417 = 0.7071/2.417 = 0.29256
- θ₂ = arcsin(0.29256) = 17.00° — dramatic bending toward normal
Example 3 — Water → Air: θ₁ = 40° (bends away)
- n₁ = 1.333, n₂ = 1.000, θ₁ = 40°
- sin(θ₂) = 1.333 × sin(40°) / 1.000 = 1.333 × 0.6428 = 0.8568
- θ₂ = arcsin(0.8568) = 58.98° — bends away from normal (entering less dense medium)
Example 4 — Find n of Unknown Material: θ₁=45°, θ₂=28°
- n₁ = 1.000 (air), θ₁ = 45°, θ₂ = 28°
- n₂ = n₁sinθ₁/sinθ₂ = 1.000 × sin(45°)/sin(28°) = 0.7071/0.4695 = 1.506
- Likely material: Flint glass (n=1.52) or similar glass
Example 5 — Glass→Air, Check if TIR: θ₁=50°
- n₁=1.52, n₂=1.00, critical angle = arcsin(1/1.52) = 41.14°
- Since 50° > 41.14° → Total Internal Reflection occurs
- sin(θ₂) = 1.52×sin(50°)/1.00 = 1.164 > 1 → no refracted ray
What Is Refractive Index? — Definition and Physical Meaning
The refractive index n of a medium is defined as the ratio of the speed of light in vacuum to the speed of light in the medium:
Physical meaning: n = 1.5 means light travels at c/1.5 = 2/3 the speed of light in that material. Water (n=1.333): v = c/1.333 = 2.249×10⁸ m/s. Diamond (n=2.417): v = c/2.417 = 1.240×10⁸ m/s — barely over 40% of c.
Why does light slow down? When light enters a medium, it interacts with the electrons in the material — being absorbed and re-emitted repeatedly. This absorption-re-emission cycle causes an effectively slower propagation speed, encoded in the refractive index.
The refractive index also equals λ_vacuum/λ_medium — the wavelength shortens inside the medium by a factor of n, but the frequency stays constant. This is why the angle of refraction formula involves n: the change in wavelength causes the wavefronts to tilt, producing the observed bending at the interface.
Critical Angle and Total Internal Reflection
Total internal reflection (TIR) is a phenomenon that occurs under two simultaneous conditions: (1) light must be traveling from a denser medium (higher refractive index) to a less dense medium, AND (2) the angle of incidence must exceed the critical angle.
Derivation from Snell's law: at the critical angle, θ₂ = 90°, so sin(θ₂) = 1. Then n₁sinθc = n₂×1 → sinθc = n₂/n₁ → θc = arcsin(n₂/n₁).
- Glass → Air: θc = arcsin(1/1.52) = 41.14° — basis for optical fibers
- Diamond → Air: θc = arcsin(1/2.417) = 24.44° — explains diamond's brilliance
- Water → Air: θc = arcsin(1/1.333) = 48.59°
Applications of total internal reflection: optical fibers (glass core, critical angle ~41°, light bounces along for thousands of km), diamonds (low critical angle means most light reflects internally creating sparkle), binocular prisms (TIR replaces mirrors for image correction), medical endoscopes (fiber bundles carry images from inside the body).
Bending Toward or Away from the Normal
The key rule of refraction: comparing the angle of incidence and the angle of refraction tells you immediately which direction the light bends.
- Entering denser medium (n₂ > n₁): θ₂ < θ₁ — bends TOWARD the normal
- Entering less dense medium (n₂ < n₁): θ₂ > θ₁ — bends AWAY from the normal
- Normal incidence (θ₁ = 0°): θ₂ = 0° always — light passes straight through without bending, regardless of the refractive index difference
The normal is always the reference: A ray hitting a glass surface at 45° to the surface has an angle of incidence of 90° - 45° = 45° to the normal. Students who measure from the surface instead of the normal get systematically wrong answers. The ray diagram above draws the normal explicitly — always use it as your reference.
Refractive Index of Common Materials — Reference Table
All values at 589 nm (sodium D-line), the standard reference wavelength. The refractive index is slightly different at other wavelengths — this variation is called dispersion, and it is why prisms split white light into colors.
Why does diamond have such a high refractive index (n=2.417)? Diamond's crystal structure causes very strong light-matter interaction — its electrons are tightly held and respond powerfully to electromagnetic radiation, slowing light dramatically. This high refractive index, combined with the very low critical angle (24.44°), means nearly all light entering a diamond undergoes total internal reflection multiple times before exiting — creating the characteristic sparkle when the diamond is cut with many facets.
Vacuum has exactly n = 1.000000 by definition — it is the reference medium. Air is only n = 1.00029, so for most practical calculations, treating air as having n = 1.000 introduces an error of only 0.03%.
Optical Fibers — Total Internal Reflection in Action
Optical fibers are the most important application of total internal reflection. A glass core (n_core ≈ 1.50) is surrounded by cladding glass (n_cladding ≈ 1.46). Light entering the fiber within the acceptance cone undergoes repeated TIR at the core-cladding interface, bouncing along the fiber with essentially zero loss.
Critical angle at core-cladding interface: θc = arcsin(1.46/1.50) = arcsin(0.973) = 76.7°. Any ray making an angle greater than 76.7° with the normal to the interface (i.e., traveling mostly along the fiber axis) undergoes TIR and stays trapped in the fiber.
Numerical Aperture: NA = sin(acceptance angle) = √(n_core² − n_cladding²) = √(1.50² − 1.46²) = √(2.25 − 2.1316) = √0.1184 ≈ 0.344.
This principle allows light to carry internet data across ocean floors — transatlantic fiber cables carry terabits per second using total internal reflection to guide photons for thousands of kilometers with amplification only every 80 km or so.
Common Mistakes in Snell's Law Calculations
Mistake 1 — Measuring Angles from the Surface, Not the Normal
- ❌ Wrong: A ray hitting a glass surface at 30° to the surface → θ₁ = 30°
- ✅ Correct: θ₁ = 90° − 30° = 60° (always measure from the normal to the interface)
- The ray diagram shows the normal explicitly — always use it as the reference
Mistake 2 — Confusing n₁ and n₂
- n₁ is always the medium the light is COMING FROM (incident medium)
- n₂ is always the medium the light is ENTERING (refracted medium)
- ❌ Wrong: "Light goes from glass into water, so n₁ = n_water" — no! n₁ = n_glass (source medium)
Mistake 3 — Expecting TIR in the Wrong Direction
- ❌ Wrong: "Light going from air (n=1.00) into glass (n=1.52) — can TIR occur?" No — TIR only occurs going from DENSER to LESS DENSE (n₁ > n₂)
- ✅ Correct: TIR requires n₁ > n₂ (light traveling into a less dense medium)
Mistake 4 — Reporting sin(θ₂) Instead of θ₂
- ❌ Wrong: sin(θ₂) = 0.375, so "θ₂ = 0.375°"
- ✅ Correct: sin(θ₂) = 0.375 → θ₂ = arcsin(0.375) = 22.03°. Always apply arcsin to find the actual angle of refraction
Mistake 5 — Using Degrees Directly in sin() Without Conversion
- In programming: Math.sin() expects radians, not degrees
- ✅ Correct: sin(30°) in code = Math.sin(30 × π/180) = Math.sin(0.5236) = 0.5000
- Using Math.sin(30) gives sin(30 radians) = −0.988 — completely wrong
Worked Examples — 8 Complete Problems
1. Air → Water, θ₁ = 30° (angle of refraction)
- n₁sinθ₁ = n₂sinθ₂: 1.000 × sin(30°) = 1.333 × sinθ₂
- sinθ₂ = 0.5/1.333 = 0.37509
- θ₂ = 22.03° — bends toward normal (denser medium)
2. Air → Diamond, θ₁ = 45°
- sinθ₂ = 1.000 × sin(45°)/2.417 = 0.7071/2.417 = 0.2926
- θ₂ = 17.00° — dramatic bending due to high refractive index of diamond
3. Water → Air, θ₁ = 40° (bends away from normal)
- sinθ₂ = 1.333 × sin(40°)/1.000 = 0.8569
- θ₂ = 58.98° — bends away from normal (entering less dense medium)
4. Find n of Unknown: θ₁=45°, θ₂=28°
- n₂ = n₁sinθ₁/sinθ₂ = 1.000 × 0.7071/0.4695 = 1.506
- Closest match: Crown glass (n=1.52) or Flint glass (n=1.62)
5. Critical Angle: Glass (1.52) → Air
- sinθc = n₂/n₁ = 1.000/1.520 = 0.65789
- θc = arcsin(0.65789) = 41.14°
6. Critical Angle: Diamond (2.417) → Air
- sinθc = 1.000/2.417 = 0.41374
- θc = 24.44° — very low critical angle explains diamond's brilliant sparkle
7. Glass (1.52) → Water (1.333) at θ₁=70°: Does TIR occur?
- θc = arcsin(1.333/1.52) = arcsin(0.8770) = 61.28°
- Since 70° > 61.28° → YES, TIR occurs
- Check: sinθ₂ = 1.52×sin(70°)/1.333 = 1.070 > 1 → confirmed TIR
8. Speed of Light in Glass (n=1.52)
- v = c/n = 2.99792458×10⁸ / 1.52 = 1.972×10⁸ m/s
- Light travels at 65.8% of c inside crown glass
Frequently Asked Questions
Related Calculators
Share This Tool
Share the Refractive Index Calculator with physics students!