Snell’s Law & Refraction Calculator
Calculate refraction angles, relative refractive index, speed ratio, and wavelength ratio using Snell’s law (n₁ sin θ₁ = n₂ sin θ₂). Includes total internal reflection (TIR) verification, critical angle (θc), Snell’s window radius, and optical fiber numerical aperture (NA) with ray tracing.
Media & Incident AngleRare → Dense
Worked Derivation & Snell’s Law Steps
n₁ × sin(θ₁) = n₂ × sin(θ₂) → 1.0003 × sin(45.0°) = 1.3330 × sin(θ₂)
sin(θ₂) = (n₁ / n₂) × sin(θ₁) = (1.0003 / 1.3330) × 0.7071 = 0.5306
θ₂ = arcsin(0.5306) = 32.04°
Light enters an optically denser medium (higher index), slowing down and bending toward the normal (θ₂ < θ₁). In this direction, total internal reflection cannot occur.
How to use
- 1
Select calculation mode
Choose from Snell’s Law Refraction, Critical Angle & TIR, or Optical Fiber & Numerical Aperture.
- 2
Configure media and angle
Select Medium 1 and Medium 2 refractive indices (air, water, glass, diamond, etc.) and enter incident angle θ₁.
- 3
Review results and ray tracing
Inspect refracted angle θ₂, reflection angle, relative index n₁₂, wavelength ratio, TIR state, and interactive SVG diagram.
Features
- Calculates refraction angle θ₂, reflection angle, relative index n₁₂, speed ratio, and wavelength ratio
- Built-in refractive index presets for vacuum, air, water, ethanol, crown glass, flint glass, and diamond
- Dynamic SVG ray tracing canvas displaying normal, interface, incident, refracted, and reflected rays
- Real-time Total Internal Reflection (TIR) detection and visual ray cutoff feedback
- Critical angle θc calculation and underwater Snell’s window circle radius and diameter
- Optical fiber Numerical Aperture (NA), maximum acceptance angle θ_max, and core-clad critical angle
- Step-by-step mathematical substitution, ratio derivations, and geometric explanations
- Runs 100% locally in browser with zero telemetry and no data transmission
Use cases
Physics homework & optics exam preparation
Master Snell’s law ratios without inverting numerators and denominators, verifying answers with worked steps.
Critical angle & gemstone brilliance exploration
Discover why diamonds (θc = 24.4°) sparkle intensely and determine the exact conditions for total internal reflection in water.
Fiber optics & waveguide acceptance calculation
Simulate core-clad numerical aperture (NA) and maximum acceptance cone angles for optical engineering.
Details
Snell’s law of refraction governs the relationship between angles of incidence θ₁ and refraction θ₂ across an interface: n₁ × sin(θ₁) = n₂ × sin(θ₂), rediscovered by Dutch astronomer Willebrord Snellius in 1621.
Refraction arises from differing phase velocities of light across media. Given vacuum speed c, speed in a medium with refractive index n is v = c / n. The relative index satisfies n₂ / n₁ = sin(θ₁) / sin(θ₂) = v₁ / v₂ = λ₁ / λ₂. When light enters an optically denser medium (higher n), it slows down, wavelength shortens, and the ray bends toward the surface normal.
When traveling from an optically denser to a rarer medium (n₁ > n₂), the angle of incidence producing a 90° refraction angle is called the critical angle: θc = arcsin(n₂ / n₁). For incident angles exceeding θc, light cannot penetrate the interface and undergoes 100% total internal reflection (TIR).
An underwater observer looking up sees the entire hemisphere of the world above compressed into a cone of half-angle θc (approx. 48.6° for water to air). Outside this circular boundary known as Snell’s window, total internal reflection reflects the seabed. The window radius at depth h is r = h × tan(θc).
Fiber optic waveguides exploit TIR by cladding a higher-index core (n_core) with a lower-index coating (n_clad). The acceptance cone half-angle θ_max is defined by the numerical aperture: NA = √(n_core² - n_clad²) = n₀ × sin(θ_max). A larger NA allows more light to be coupled and guided.
This tool combines rigorous formula evaluations with an interactive SVG ray diagram that renders incident, refracted, and reflected rays, normal lines, and total reflection thresholds in real time.
FAQ
How do you determine which way a refracted ray bends?
When entering an optically denser medium (n₁ < n₂), light slows down and bends toward the normal line (θ₂ < θ₁). Conversely, when entering a rarer medium (n₁ > n₂), light speeds up and bends away from the normal (θ₂ > θ₁).
What conditions are required for total internal reflection (TIR)?
Two conditions must be met: (1) Light must travel from a denser to a rarer medium (n₁ > n₂), and (2) the angle of incidence must equal or exceed the critical angle θc = arcsin(n₂ / n₁).
What is Snell’s window?
When looking up from underwater, light from the entire 180° above-water hemisphere is compressed into a cone of half-angle ~48.6° (the critical angle). The illuminated circle on the surface is Snell’s window; outside it, total internal reflection mirrors the bottom.
What does numerical aperture (NA) mean in fiber optics?
Numerical aperture is a dimensionless measure of an optical fiber’s light-gathering capacity: NA = √(n_core² - n_clad²). The maximum half-angle of the acceptance cone in air is θ_max = arcsin(NA).
Does light frequency or color change during refraction?
No. Frequency f remains constant across different media. Because velocity decreases (v = c / n), wavelength is compressed proportionally: λ = λ₀ / n.
Related Tools
Thin Lens Calculator
Calculate image distance, magnification, and orientation (real/virtual, inverted/upright) using the thin lens equation (1/a + 1/b = 1/f) and ray tracing. Includes eyeglass diopters and compound lens systems.
Trigonometry Calculator
Enter an angle to get sin, cos and tan at once. Special angles like 30°, 45° and 60° are shown as exact values (1/2, √3/2), with degree and radian support, pi expressions such as pi/6, plus the quadrant signs and the reference-angle working.
Unit Converter
Convert length, weight and temperature instantly. Meters, inches, kilograms, pounds and more.
Constant Acceleration
Calculate velocity and displacement from initial velocity, constant acceleration and time, with unit conversion and worked steps.
All processing happens in your browser. Your files are never uploaded.
Verified: Verified air-to-water (45° -> 32.04°), air-to-glass (60° -> 34.82°), air-to-diamond (45° -> 17.00°), critical angle in water (48.61°, Snell window r=2.27m at 2m depth), TIR at 60°, and optical fiber NA (core 1.50, clad 1.45 -> NA=0.3841, angle 22.58°) with automated tests
Did you know?
Although named after Willebrord Snellius who rediscovered it in 1621, the law of refraction was first mathematically documented in 984 CE by Persian polymath Ibn Sahl in Baghdad. Today, total internal reflection derived from this law powers intercontinental undersea fiber-optic Internet cables.