n1·sin(θ1) = n2·sin(θ2) — solve refraction angle, critical angle and total internal reflection — browser-only
- Runs locally
- Category Calculator
- Best for Getting a realistic range before a purchase, plan, workout, or schedule decision.
What this tool does
Free Snell's law calculator for refraction problems in physics homework, optics labs and lens design. Enter any three of the two refractive indices and the two angles, and the tool solves the fourth from n1·sin(θ1) = n2·sin(θ2). Going from a denser to a thinner medium it also reports the critical angle θc = arcsin(n2/n1) and flags total internal reflection when the incidence angle reaches it, so you instantly see when a fiber, a prism or a water surface stops letting light out. Built-in presets cover vacuum (1), air (1.0003), water (1.33), glass (1.5) and diamond (2.42), and you can type any custom index. A live ray diagram shows the bend toward or away from the normal, one click copies the worked result, and the shareable URL reopens your exact setup. Everything runs in your browser; no upload, no account, no tracking of what you enter.
Tool details
- Input
- Numbers
- The page exposes text boxes, numeric controls, file pickers, or structured inputs depending on the tool.
- Output
- Live result + Copy + Preview
- The result area focuses on usable output, with copy, download, or preview actions when supported.
- Privacy
- Browser-side processing
- The main tool logic does not call an external API, so inputs normally stay in the current tab.
- Save / share
- Shareable URL state
- Key settings are encoded in the URL so another person can reopen the same setup.
- Performance budget
- Initial JS <= 10 KB
- No WASM budget is declared, keeping the tool quick to open on mobile.
- Best fit
- Calculator · Student
- Category and role tags drive related tools, internal links, and quick fit checks.
How to use
-
1. Input
Paste or drop your content into the tool panel.
-
2. Process
Click the button. All processing is local in your browser.
-
3. Copy / Download
Copy the result or download to disk in one click.
How Snell's Law Calculator fits into your work
Use it for fast estimates, comparisons, and planning numbers before you make the final call.
Calculation jobs
- Getting a realistic range before a purchase, plan, workout, or schedule decision.
- Comparing scenarios by changing one input at a time.
- Turning rough assumptions into a number you can discuss.
Calculation checks
- Double-check units, dates, rates, and rounding assumptions.
- Treat health, finance, tax, and legal outputs as planning aids, not professional advice.
- Save the inputs that produced an important result so you can reproduce it later.
Good next steps
These links move the current task into a more complete workflow.
- 1 Lens Equation Calculator Solve 1/f = 1/do + 1/di — enter any two of focal length, object and image distance, get the third plus magnification and a real/virtual verdict, browser-only Open
- 2 Scientific Calculator Scientific calculator — sin / cos / log / sqrt / power, with full keyboard input + history, deg/rad mode. Open
- 3 Frequency Wavelength Calculator Convert frequency to wavelength and back with λ = v/f, pick the wave speed, read the EM spectrum band, copy in one click, browser-only Open
Real-world use cases
Check a physics refraction homework answer
Your problem says light hits a water surface at 40 degrees from the normal — find the refraction angle. Set n1 = 1 for air, n2 = 1.33 for water, θ1 = 40, leave θ2 blank, and read θ2 ≈ 28.9 degrees. The tool also notes the ray bends toward the normal, so you can sanity-check that your hand calculation has the geometry right before you turn in the worksheet.
Find when an optical fiber traps light
A step-index fiber has a glass core (n1 = 1.5) against a thinner cladding. Put the cladding index in n2 and read the critical angle: a 1.5 core against air gives 41.8 degrees, against a 1.46 cladding only about 76.7 degrees. Any ray hitting the wall steeper than that totally internally reflects and stays in the core — exactly the condition that lets a fiber carry a signal for kilometers.
Identify a liquid with a refractometer reading
A bench refractometer gives you the incidence and refraction angles across a known prism. Leave n2 blank, fill n1, θ1 and θ2, and the tool back-solves the unknown index from n2 = n1·sin θ1 / sin θ2. Compare that number against a reference table to tell sugar syrup from saline, or to flag an adulterated sample whose index drifts off the expected value.
Explain why a diamond sparkles more than glass
Set n1 = 2.42 for diamond and n2 = 1 for air and read the critical angle of about 24.4 degrees, then do the same for glass (1.5 → air) and get 41.8 degrees. The much smaller diamond angle means light entering a cut stone hits most facets past critical and bounces internally many times before escaping, which is the optics behind the fire jewelers talk about.
Prep a worked example for a physics class
Teaching refraction, you want the same numbers on the board and on the handout. Build the air-to-glass case, copy the result, and share the URL so students open the identical setup at home. Then nudge θ1 up to the critical angle live in class and let them watch the refracted ray vanish into total internal reflection on the diagram.
Common pitfalls
Measuring the angle from the surface instead of from the normal. Snell's law uses the angle between the ray and the perpendicular (normal) to the boundary. A ray grazing 10 degrees above the surface is θ1 = 80 degrees in the formula, not 10. Get this backward and every refraction angle comes out wrong.
Expecting a critical angle when going from a thinner to a denser medium. Total internal reflection only happens dense to rare (n1 > n2). Entering n1 = 1 (air) and n2 = 1.5 (glass) has no critical angle at all — the tool returns none because light always refracts into the denser medium, no matter the incidence angle.
Swapping n1 and n2. The first index belongs to the medium the light starts in (the incident side), the second to the medium it enters. Flipping them turns a bend toward the normal into a bend away from it and can invent or erase a critical angle. Always enter the indices in the direction the light actually travels.
Privacy
Every step — the Snell's law solve, the critical angle, the total internal reflection check and the ray diagram — is plain JavaScript that runs in your browser tab. No index, angle or result ever leaves the page, and nothing about what you enter is logged. The one caveat: the shareable URL encodes n1, n2 and the incidence angle in the query string, so a "share link" pasted into chat records those values in the recipient server's access log. For anything you would rather keep private, use the copy button and paste the text instead of the URL.
FAQ
Tool combos
Folks in your role tend to reach for these alongside this tool.
- Chinese Acupoint Locator 200+ meridian acupoints / WHO 2008 standard locations / with contraindications, manipulation, and combinations.
- Affine Cipher Encoder & Decoder Encrypt and decrypt the ax+b affine cipher with live modular-inverse check, browser-only
- Anagram Solver Check if two words are anagrams, rearrange a set of letters into every ordering, and read the sorted letter fingerprint, all in your browser
- Angle Converter Degrees, radians, gradians, turns, arcminutes, arcseconds and NATO mils, all from one input, copyable, browser-only