Prism angle of deviation calculator
With 48° of incidence, 52° of emergence and a 60° apex, a ray leaving the prism has turned 40°. Enter the three angles in degrees and get the signed deviation, its size and each substitution step. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- Incidence angle deg
- 48
- Emergence angle deg
- 52
- Apex angle deg
- 60
- Deviation angle deg
- 40
- Deviation angle rad
- 0.6981317008
- Deviation magnitude deg
- 40
- Direction
- reference_direction
This prism angle of deviation calculator finds how far a ray changes direction after passing through a triangular prism. Enter the angle of incidence at the first face, the angle of emergence at the second face, and the prism apex angle, all in degrees. The calculator applies the standard geometric relation δ = i + e − A and reports the signed deviation in degrees and radians, its magnitude, the indicated direction, and transparent substitution steps. It is useful for laboratory checks, optics lessons, and deterministic calculations in software.
Understand the three angles in the prism formula
A triangular prism changes a ray’s direction at two refracting faces. The incidence angle i is measured between the incoming ray and the normal to the first face, not between the ray and the glass surface. The emergence angle e is measured in the same way at the second face: between the outgoing ray and that face’s normal.
The apex angle A is the included angle between the two refracting faces of the prism. With those conventions, the total signed deviation is δ = i + e − A. This relation follows from the geometry of the ray and the two face normals; it does not require a refractive index once the external incidence and emergence angles are already known.
Keep every measurement in degrees when entering it. The response also converts the final result to radians for calculations that use SI-style angular expressions. The tool does not infer an emergence angle from Snell’s law, so provide the observed or previously calculated value at the second face.
Know the model’s scope and verify measurements
This calculation describes total geometric deviation when both external ray angles and the prism apex angle are available. It does not calculate refraction at either boundary, minimum deviation, refractive index, dispersion, wavelength dependence, critical angles, or total internal reflection. If you know refractive index rather than the emergence angle, first solve the two interfaces with Snell’s law or use a calculator designed for minimum deviation.
In a laboratory, read each external angle from the correct surface normal and keep a consistent direction convention. Measuring from a face instead of its normal replaces an angle with its complement and can create a plausible-looking but incorrect result. You can verify any response by adding the two external angles and subtracting the apex angle yourself.
Validation failures identify missing, nonnumeric, or out-of-range fields before any result is returned.
What you can do with it
Check an optics laboratory reading
Compare a measured outgoing ray with the deviation predicted from the two external angles and the prism apex.
Verify prism homework
Confirm the geometric deviation step after incidence and emergence angles have been found or supplied.
Build deterministic ray tests
Create stable expected values for optical simulation tests without network calls or hidden state.
FAQ
What formula does the calculator use?
It uses δ = i + e − A, where i is incidence, e is emergence, and A is the prism apex angle.
Are the input angles measured from the prism faces?
No. Incidence and emergence are measured from the normal to their respective faces; the apex angle is measured between the faces.
Why can the deviation be negative?
The signed result preserves the chosen directional convention. Its magnitude is returned separately when only the size of the deviation is needed.
Does this calculate minimum deviation or refractive index?
No. It calculates total deviation from already known external angles and the apex angle; it does not solve Snell’s law or the minimum-deviation condition.
How do I find the deviation of a 60° prism?
Add the incidence and emergence angles, then subtract 60°. With 48° going in and 52° coming out, the deviation is 48 + 52 − 60 = 40°.
Related tools
For developers — API access
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.
API endpoint
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.
Call it from your stack
curl -X POST https://api.kit.forhosting.com/optics/prism-angle-of-deviation \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"incidence_angle_deg":48,"emergence_angle_deg":52,"apex_angle_deg":60}'const res = await fetch("https://api.kit.forhosting.com/optics/prism-angle-of-deviation", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"incidence_angle_deg": 48,
"emergence_angle_deg": 52,
"apex_angle_deg": 60
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/optics/prism-angle-of-deviation",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"incidence_angle_deg": 48,
"emergence_angle_deg": 52,
"apex_angle_deg": 60
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/optics/prism-angle-of-deviation", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"incidence_angle_deg":48,"emergence_angle_deg":52,"apex_angle_deg":60}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"incidence_angle_deg":48,"emergence_angle_deg":52,"apex_angle_deg":60}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/optics/prism-angle-of-deviation", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"incidence_angle_deg": 48,
"emergence_angle_deg": 52,
"apex_angle_deg": 60
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "optics.prism_angle_of_deviation",
"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.
Pricing
Published price — no tokens, no invented credits. A failed task is never charged.
Errors
| HTTP | Code | Meaning |
|---|---|---|
401 | unauthorized | Missing or invalid API key. |
402 | insufficient_balance | Your balance doesn't cover the task price. |
404 | unknown_type | That task type doesn't exist. |
429 | rate_limited | Too many requests. Use the webhook instead of polling. |
Technical notes
Understand the three angles in the prism formula
A common equilateral laboratory prism has A = 60 degrees, but the calculator accepts any apex angle strictly between zero and 180 degrees.
Enter values and interpret the signed result
Incidence and emergence may range from zero to 90 degrees, while the apex must be greater than zero and less than 180 degrees. The direction field explains the sign convention. A negative result is not silently converted to a positive angle because sign may matter in ray diagrams and coordinate-based simulations; use the magnitude field when direction is irrelevant. The ordered steps show the exact substitution, making the answer easy to audit. Supply incidence_angle_deg, emergence_angle_deg, and apex_angle_deg as finite numbers. For example, i = 48 degrees, e = 52 degrees, and A = 60 degrees give δ = 40 degrees. The output repeats the normalized inputs, returns deviation_angle_deg and deviation_angle_rad, and includes deviation_magnitude_deg for workflows that care only about the size of the turn. A positive result is labeled reference_direction, zero is no_net_deviation, and a negative result is opposite_reference_direction. Numeric strings are intentionally not accepted: callers should send JSON numbers, which avoids ambiguous formatting, degree symbols, commas, and unit text in fields intended for arithmetic.
Know the model’s scope and verify measurements
The API uses pure deterministic arithmetic without network access, random values, or the current time, and rounds published numeric results to twelve decimal places for stable comparisons. Browser and API execution therefore use the same solve function. A successful API request costs $0.002; the browser version can be used for quick checks.
Technical questions
What does an API calculation cost?
A successful API request costs $0.002. The browser calculator is available for interactive checks.