ASA triangle calculator
Two angles and the side between them fix a triangle completely: from 40°, 60° and an included side of 10 you get a third angle of 80° and sides of 6.527036446661 and 8.793852415718. Handy for two bearings and a baseline. 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
- Angle b
- 60
- Side c
- 10
- Angle c
- 80
- Side a
- 6.5270364467
- Side b
- 8.7938524157
- Unit angles
- deg
Angle-side-angle (ASA) is one of the classic congruence and construction cases in plane geometry: when you know two angles of a triangle and the side that lies between them, the triangle is completely determined. This calculator takes those three measurements, checks that the angles can form a triangle, computes the third angle from the one-hundred-eighty-degree sum, and applies the law of sines to recover the two unknown sides. Degenerate cases—angles that are not positive, sides that are not positive, or two angles that sum to one hundred eighty degrees or more—are rejected with a clear validation error instead of a silent NaN or a flat line that only looks like a triangle.
How ASA determines a unique triangle
In a plane triangle the three interior angles always sum to one hundred eighty degrees, so any two known positive angles that sum to less than that figure leave exactly one positive third angle. The included side sits between the two known angles: if you label those angles A and B, the included side is c, which is opposite the unknown angle C.
Once C equals one hundred eighty minus A minus B, the law of sines states that each side is proportional to the sine of its opposite angle: a over sine of A equals b over sine of B equals c over sine of C. Solving for the unknowns is therefore a equals c times sine of A over sine of C, and b equals c times sine of B over sine of C.
That is the only arithmetic this service performs after validating inputs—no iterative optimization, no diagram reconstruction, and no random sampling. Classic classroom checks include A equals forty degrees, B equals sixty degrees, and c equals ten, which yields C equals eighty degrees and sides a and b that match hand computation with a scientific calculator. The same closed path covers acute and obtuse cases as long as both given angles stay positive and their sum stays strictly below one hundred eighty.
Where ASA triangle solves show up in real work
Secondary-school and college geometry courses constantly ask students to complete a triangle given two angles and the included side; a trusted calculator with a strict angle-sum check speeds homework grading and removes spreadsheet mistakes where someone applies the law of sines even when the figure cannot close. Drafting, surveying, and simple CAD workflows often capture two bearing angles and the baseline between them, then need the remaining sides before staking a third point—having a shared numeric oracle keeps field notes and office scripts aligned.
Game and graphics tutorials use ASA when a character faces two known directions from a measured segment; the solve answers how far each free edge extends without building a full constraint solver. If you later need SAS, SSS, AAS, SSA ambiguous cases, area formulas, or radian input, treat those as separate search intents rather than overloading this ASA landing.
What you can do with it
Homework and exam checks
Complete ASA triangles for classroom problems and reject angle sums of 180° or more with a clear error instead of a broken figure.
Survey baseline and two angles
From a measured included baseline and two interior angles, recover the remaining sides before staking the third vertex.
FAQ
What does ASA mean in this calculator?
ASA means two angles and the included side between them.
What happens if the two angles sum to 180° or more?
A plane triangle requires the two given angles to sum to strictly less than 180 degrees.
Are angles in degrees or radians?
Degrees only. Convert from radians yourself before calling if your source data is in radians.
What does it cost?
The browser tool is free and runs locally.
How are the two unknown sides calculated?
With the law of sines: each unknown side is the included side times the sine of its opposite angle, divided by the sine of the third angle. For 40°, 60° and an included side of 10, they are 6.527036446661 and 8.793852415718.
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/geom/triangle-asa \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"angle_a":40,"angle_b":60,"side_c":10}'const res = await fetch("https://api.kit.forhosting.com/geom/triangle-asa", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"angle_a": 40,
"angle_b": 60,
"side_c": 10
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/geom/triangle-asa",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"angle_a": 40,
"angle_b": 60,
"side_c": 10
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/geom/triangle-asa", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"angle_a":40,"angle_b":60,"side_c":10}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"angle_a":40,"angle_b":60,"side_c":10}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/geom/triangle-asa", 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,
"angle_b": 60,
"side_c": 10
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "geom.triangle_asa",
"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
Students, teachers, surveyors, and CAD helpers get a deterministic JSON result with all three angles in degrees and all three side lengths in the same unit as the included side you supplied. The free browser tool and the paid API share one pure function, so classroom demos and automated pipelines never silently diverge on the same inputs.
How ASA determines a unique triangle
If the sum reaches or exceeds one hundred eighty, no plane triangle exists, and this endpoint refuses the request rather than inventing a negative or zero third angle. That hard gate matches how textbooks state the ASA case and keeps downstream code from treating an impossible figure as a normal solve.
What you send and what you get back
Wire the free browser tool for quick sanity checks, then call the identical contract from scripts when you need bulk evaluation of ASA solves without reimplementing the angle-sum gate in every language. Provide three required finite numbers: angle_a (aliases A, angle1, alpha) and angle_b (aliases B, angle2, beta) in degrees, plus side_c (aliases c, included_side, side) as the positive included side length in any consistent linear unit. Missing fields, non-numeric strings, NaN, and Infinity are rejected with invalid_input and are not charged. After parsing, the service checks that each angle lies strictly between zero and one hundred eighty degrees, that the included side is strictly positive, and that angle_a plus angle_b is strictly less than one hundred eighty; if the sum is one hundred eighty or more, the error message states the sum so form clients and scripts can correct the input without guessing. On success the JSON response echoes the normalized angles and side_c, returns angle_c as one hundred eighty minus the sum of the given angles, returns side_a and side_b from the law of sines, sets unit_angles to deg, and includes method as the string law_of_sines for documentation in logs and teaching UIs. Example checks: forty, sixty, and ten yield eighty degrees for the third angle and positive side_a and side_b; ninety plus ninety with any side fails invalid_input; a zero or negative included side fails the same way.
Where ASA triangle solves show up in real work
Because this capability is a pure parse engine, API pricing is the published base of $0.002 per successful item and failed validation does not consume balance.
Integration use cases
CAD and game geometry helpers
Fill unknown edges when two face angles and the shared segment are known, using the same law-of-sines path in browser and API.
Technical questions
What formula does it use?
angle_c = 180 − angle_a − angle_b, then the law of sines: side_a = side_c · sin(angle_a) / sin(angle_c) and side_b = side_c · sin(angle_b) / sin(angle_c).