ForHosting KIT · Science

Critical angle calculator

Tells you where total internal reflection begins: light going from glass (index 1.5) towards air (index 1) is fully reflected beyond 41.8103148958°, the arcsine of 1 over 1.5. The first medium must be the denser one. Free in your browser.

  • Free
  • Runs in your browser
  • No sign-up
  • Your data stays on your device
Use it from WebAPIEmailTelegramApp soon
If you enter
N1
1.5
N2
1
You get
Ratio
0.6666666667
Critical angle rad
0.7297276562
Critical angle deg
41.8103148958

The critical angle is the smallest angle of incidence, measured from the normal, at which light traveling in a denser medium is totally reflected at the boundary with a rarer medium. From Snell's law with a ninety-degree refracted ray, that angle is the inverse sine of the ratio of the two refractive indices: theta-c equals arcsin of n2 over n1, provided n1 is strictly greater than n2. Students checking total-internal-reflection homework, fibre-optics instructors verifying acceptance-angle prerequisites, lab technicians comparing glass-to-air and water-to-air interfaces, and tutoring platforms that need structured numbers all need a deterministic critical-angle calculator rather than a hand-wavy diagram.

What the critical angle means and which two indices you need

When a ray travels from medium one into medium two, Snell's law relates the sines of the angles of incidence and refraction to the refractive indices n1 and n2. If n1 is greater than n2, the refracted ray bends away from the normal, and as the incidence angle increases the refraction angle approaches ninety degrees. The incidence angle at which the refracted ray would graze the interface is the critical angle: sin of theta-c equals n2 over n1, so theta-c equals arcsin of that ratio.

Beyond theta-c there is no real refracted ray in medium two and the interface exhibits total internal reflection, the phenomenon that guides light in optical fibres, keeps a pool floor bright when viewed from underwater, and appears in right-angle prisms. Search intent clusters around phrases such as critical angle calculator, total internal reflection calculator, critical angle of glass to air, arcsin n2 over n1, and refractive index critical angle.

People want numeric degrees and radians they can check against a worksheet or embed in a pipeline—not only a reminder that the formula exists. Keep both indices dimensionless relative refractive indices for the same wavelength context; the engine does not model dispersion tables.

Homework and lab TIR drills

Students and graders compute critical angles for glass–air, water–air, and other textbook pairs, compare degrees to answer keys, and get a clear error when n1 is not larger than n2.

Fibre and prism design checks

Quick verification that a core–cladding or glass–air interface supports total internal reflection above a stated incidence angle before deeper ray-trace work.

Is the critical angle calculator free?

The browser tool runs free on your device.

Does this implement full Snell's law for any incidence angle?

No. This capacity solves only the critical angle for TIR from two indices. It does not return refracted angles for arbitrary incidence.

What is the critical angle from glass to air?

With 1.5 for glass and 1 for air, it is 41.8103148958° from the normal. Rays hitting the boundary at a larger angle are reflected back into the glass instead of leaving it.

Why must the first refractive index be larger than the second?

Total internal reflection only happens when light travels from a denser medium into a rarer one. If the first index is not larger, there is no critical angle, and the calculator rejects the pair.

Where is total internal reflection used?

It guides light along optical fibres, makes right-angle prisms work as mirrors, and explains why a pool floor looks bright when you view it from underwater.

Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.

POSThttps://api.kit.forhosting.com/optics/critical-angle

Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.

curl -X POST https://api.kit.forhosting.com/optics/critical-angle \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"n1":1.5,"n2":1}'
{
  "n1": 1.5,
  "n2": 1
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "optics.critical_angle",
  "status": "queued",
  "_links": {
    "result": "/tasks/tsk_…/result"
  }
}

The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.

Per request$0.002

Published price — no tokens, no invented credits. A failed task is never charged.

HTTPCodeMeaning
401unauthorizedMissing or invalid API key.
402insufficient_balanceYour balance doesn't cover the task price.
404unknown_typeThat task type doesn't exist.
429rate_limitedToo many requests. Use the webhook instead of polling.

What the critical angle means and which two indices you need

Delivering n1, n2, ratio, critical_angle_rad, critical_angle_deg, formula, and method as JSON makes the result easy to paste into notes, diff in automated tests, or reuse across languages without reimplementing inverse trigonometric arithmetic.

How this calculator validates input and applies θc = arcsin(n2 / n1)

Numeric strings that parse to finite positives are accepted so forms and CSV-style pipelines can pass values without an extra cast. After validation, the ratio r equals n2 divided by n1 is formed, theta-c in radians is Math.asin of r, and degrees equal radians times one hundred eighty over pi. Classic classroom checks include glass to air with n1 around one point five and n2 equals one, water to air with n1 about one point three three, and diamond to air with a much larger n1 and a correspondingly smaller critical angle. There is no multilayer stack, no absorption, and no wavelength table; this is ideal planar-interface algebra from the two known indices. Send a JSON body with required n1 and n2. Aliases n_incident, incident_index, and incident map to the first (incident) index; aliases n_transmitted, transmitted_index, and transmitted map to the second (transmitted) index. Every provided field must be a finite positive number: missing fields, empty strings, non-numeric text, zero, negative values, NaN, and Infinity all fail immediately with invalid_input before any result is returned, and failed validation is not charged. The product contract requires the first index to be strictly larger than the second: if n1 is smaller than n2, or if the two indices are equal, the request fails with invalid_input because total internal reflection has no real critical angle for that interface direction. Results are rounded to a stable decimal precision so the same input always yields the same JSON across JavaScript engines.

Practical use, limits, pricing, and delivery channels

Use the browser tool when you want an immediate critical-angle check while grading total-internal-reflection homework, verifying a fibre numerical-aperture prerequisite, comparing glass-air versus water-air interfaces, or sanity-checking a prism design sketch. Always put the denser medium first as n1 so the inequality n1 greater than n2 matches the physical TIR setup; reversing the labels will correctly trigger the first-index-smaller error instead of inventing a meaningless angle. There is no language model, no external optics service, and no randomness, so the capacity is safe to pin in continuous-integration checks and reproducible lesson materials. Each successful request is one billable item at $0.002; failed validation does not consume balance. Results are fully deterministic: the same two indices always yield the same critical_angle_deg and critical_angle_rad. Wire the endpoint into fibre-optics drills, contest answer checkers, physics worksheets, or preprocessing steps where you already prefer explicit domain errors—such as rejecting a smaller first index—over opaque black-box widgets that cannot explain why a bad input was refused.

Tutoring platforms and CI fixtures

Lesson builders and automated physics checkers pin deterministic JSON (ratio, radians, degrees) without embedding inverse-sine code in every language runtime.

How do I calculate the critical angle from two refractive indices?

Send JSON with n1 (incident, denser medium) and n2 (transmitted, rarer medium). The response includes critical_angle_rad, critical_angle_deg, and ratio = n2/n1 via θc = arcsin(n2/n1).

What happens if the first index is smaller than the second?

The request fails with invalid_input. Total internal reflection requires n1 > n2; when the first index is smaller (or equal), there is no real critical angle and the call is not charged.

Are results returned in degrees or radians?

Both. critical_angle_deg is degrees and critical_angle_rad is radians, plus the intermediate ratio n2/n1 for verification.

Read the full KIT documentation →