Law of sines calculator
Finish a whole triangle from sparse data: angle A of 40°, side a of 7 and angle B of 60° give a third angle of 80° plus both missing sides. Impossible side-side-angle data is refused, not faked. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- Angle a
- 40
- Side a
- 7
- Angle b
- 60
- Angle c
- 80
- Side b
- 9.4310744873
- Side c
- 10.7246222037
- Angle unit
- deg
The law of sines relates each side of a plane triangle to the sine of its opposite interior angle: a over sin A equals b over sin B equals c over sin C. Whenever you already know one angle-side pair and one additional measurement—another angle or the side opposite the second angle—you can recover the unknown parts of the figure without a full computer-algebra system. Students meet this identity in AAS, ASA, and SSA congruence drills, contest problems, and standardized tests that ask for a missing length or angle from sparse data. Survey helpers, CAD assistants, and scripted lesson platforms need a deterministic numeric answer they can pin in continuous integration rather than a sketch that only works for one labeled figure.
What the law of sines is and which sparse data determines a triangle
In Euclidean plane geometry the law of sines is the proportional relationship a over sin A equals b over sin B equals c over sin C for any non-degenerate triangle. Fixing one angle and its opposite side fixes the common ratio, so a second angle immediately determines the remaining angles by the one-hundred-eighty-degree sum and then determines the remaining sides from that ratio.
Giving a second side opposite another unknown angle is the SSA pattern: you solve for the sine of the unknown angle first, then take an inverse sine when the value lies in the closed unit interval. Search intent clusters around phrases like law of sines calculator, find missing side with law of sines, SSA ambiguous case, and AAS angle side solver.
People want a numeric result they can check against a worksheet answer key, a survey note, or a CAD dimension, not only a geometric argument that two triangles are congruent.
What you can do with it
Homework and exam law-of-sines drills
Students and graders confirm missing sides or angles from a known pair plus one more measurement, including clear rejection when an SSA sine would exceed one.
FAQ
What formula does the calculator apply?
The law of sines: a/sin(A) = b/sin(B) = c/sin(C). With a second angle it completes the 180° sum first; with a second side it solves sin(B) = b·sin(A)/a then arcsin.
Is the law of sines calculator free?
The browser tool runs free on your device.
How do I find a missing side with the law of sines?
Start from an angle and the side opposite it, then add a second angle. Side a divided by the sine of A sets a ratio that every other side shares, so each missing side is that ratio times the sine of its opposite angle.
What happens when the side-side-angle data cannot form a triangle?
The calculator refuses it. If you give a second side and the sine of its opposite angle would have to exceed one, no triangle has those measurements, so you get a clear rejection instead of an invented shape.
Which measurements do I need to enter?
One angle with the side opposite it, plus exactly one more value: a second angle or the side opposite that second angle. Giving neither leaves the triangle open, and giving both is refused.
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/trig/law-of-sines \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"angle_a":40,"side_a":7,"angle_b":60}'const res = await fetch("https://api.kit.forhosting.com/trig/law-of-sines", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"angle_a": 40,
"side_a": 7,
"angle_b": 60
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/trig/law-of-sines",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"angle_a": 40,
"side_a": 7,
"angle_b": 60
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/trig/law-of-sines", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"angle_a":40,"side_a":7,"angle_b":60}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"angle_a":40,"side_a":7,"angle_b":60}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/trig/law-of-sines", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"angle_a": 40,
"side_a": 7,
"angle_b": 60
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "trig.law_of_sines",
"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
This capacity accepts angle_a and opposite side_a plus exactly one of angle_b or side_b, rejects inconsistent SSA data when the required sine would exceed one, and returns the completed set of angles and sides as structured JSON.
What the law of sines is and which sparse data determines a triangle
Delivering all three angles and all three sides as JSON makes the result easy to paste into notes, diff in automated tests, or feed into a larger pipeline without reimplementing degree-to-radian conversion and sine ratios in every language you teach or deploy across homework portals and engineering scripts.
How this calculator validates input, applies the law of sines, and rejects impossible sines
Angles are measured in degrees as positive interior values strictly less than one hundred eighty. The engine checks that each provided field is a finite number, that sides are positive, and that exactly one of the two optional fields is present—neither under-specifies the problem and both over-specifies the intended pair. Remaining sides follow from side over sine ratios using the known pair. Edge cases are explicit: zero or negative lengths, non-numeric strings, both optional fields at once, and SSA configurations whose sine exceeds one all fail before a fake triangle is returned. Send a JSON body with required fields angle_a and side_a, plus exactly one of angle_b or side_b. When angle_b is given, the third angle is one hundred eighty minus the sum of the two known angles; if that sum is one hundred eighty or more, no plane triangle exists and the request fails with invalid_input so those failed calls are not charged. When side_b is given instead, the law of sines requires sin of angle_b equal to side_b times sin of angle_a over side_a. If that quantity exceeds one, the data is inconsistent: no real angle_b exists, and the capacity rejects the request with a clear invalid_input message naming the sine excess. When the sine is valid, the primary angle_b is the arcsine in degrees, the third angle completes the sum, and the last side follows from the same ratio. Results are rounded to a stable decimal precision so the same input always yields the same JSON.
Practical use, limits, pricing, and delivery channels
Use the browser tool when you want an immediate law-of-sines solution while checking homework, verifying a construction sketch, or confirming a survey note without installing a computer-algebra system. Accepted angles must leave a positive third interior angle, and sides must be positive finite lengths in whatever unit you already use for the figure; the response lengths share that same unit. There is no language model, no external geometry 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 angle_a, side_a, and extra measurement always yield the same completed angles and sides. Wire the endpoint into congruence demos, contest answer checkers, engineering worksheets that list an angle-side pair plus one more value, or floating preprocessing steps where you already prefer explicit domain errors—especially sine greater than one—over opaque black-box widgets that cannot show why an SSA triple cannot form a real triangle.
Integration use cases
Deterministic fixtures for trigonometry tests
Pipelines that seed unit tests or interactive AAS/SSA demos can call a pure law-of-sines oracle instead of reimplementing degree trig in every language.
Survey and CAD recovery from sparse angle-side data
Field notes that record one angle, its opposite side, and one more angle or side recover the remaining lengths as structured JSON for reports or lightweight CAD helpers.
Technical questions
How do I use the law of sines with this API?
Send angle_a and opposite side_a plus exactly one of angle_b or side_b to trig.law_of_sines. The response returns all three angles and all three sides.
What happens if the computed sine exceeds one?
The request fails with invalid_input. That means the SSA data is inconsistent and no real angle_b exists; those calls are not charged.
Can I send both angle_b and side_b?
No. Provide exactly one extra measurement beyond the angle_a/side_a pair. Sending both or neither fails with invalid_input so the intended ratio problem stays unambiguous.