{"success":true,"version":"v1","request":{"tool":"get_calculator_schema","calculator_id":"triangle-solver"},"result":{"entity_type":"calculator","id":"triangle-solver","calculator_id":"triangle-solver","canonical_url":"https://tttkmbb.com/geometry/triangle-solver","name":"Triangle Solver","title":"Triangle Solver – Sides, Angles, Area and Type from SSS or SAS (Law of Cosines)","category":"geometry","category_name":"Geometry","tool_name":"solve_triangle","featured_mcp_tool":false,"description":"Solves a triangle from three sides (SSS) or from two sides and their included angle in degrees (SAS) with the law of cosines, returning all sides, all angles, perimeter, area, inradius, circumradius and the classification by sides and by angles.","use_when":"You know three sides, or two sides and the angle between them, and need the remaining sides and angles, the area or the triangle type.","do_not_use_when":"You know two angles and a side (ASA/AAS) or a non-included angle (SSA), which this calculator does not accept; for right triangles from two sides use right-triangle.","inputs":[{"name":"side_a","label":"Side a","type":"number","unit":"units","required":true,"exclusive_min":0,"description":"First side.","example":3},{"name":"side_b","label":"Side b","type":"number","unit":"units","required":true,"exclusive_min":0,"description":"Second side.","example":4},{"name":"side_c","label":"Side c","type":"number","unit":"units","required":false,"exclusive_min":0,"description":"Third side, opposite the angle between a and b (SSS). Omit for SAS.","example":5},{"name":"angle_c_deg","label":"Angle C (between a and b)","type":"number","unit":"degrees","required":false,"exclusive_min":0,"exclusive_max":180,"description":"Included angle between side_a and side_b in degrees (SAS). Omit when side_c is given.","example":90}],"outputs":[{"name":"side_a","label":"Side a","type":"number","unit":"units","decimals":4,"description":"Side opposite angle A."},{"name":"side_b","label":"Side b","type":"number","unit":"units","decimals":4,"description":"Side opposite angle B."},{"name":"side_c","label":"Side c","type":"number","unit":"units","decimals":4,"description":"Side opposite angle C (computed for SAS)."},{"name":"angle_a_deg","label":"Angle A","type":"number","unit":"degrees","decimals":4,"description":"Angle opposite side_a."},{"name":"angle_b_deg","label":"Angle B","type":"number","unit":"degrees","decimals":4,"description":"Angle opposite side_b."},{"name":"angle_c_deg","label":"Angle C","type":"number","unit":"degrees","decimals":4,"description":"Angle opposite side_c."},{"name":"perimeter","label":"Perimeter","type":"number","unit":"units","decimals":4,"description":"side_a + side_b + side_c."},{"name":"area","label":"Area","type":"number","unit":"units²","decimals":4,"description":"½ · side_a · side_b · sin C."},{"name":"inradius","label":"Inradius","type":"number","unit":"units","decimals":4,"description":"Radius of the inscribed circle = area / semiperimeter."},{"name":"circumradius","label":"Circumradius","type":"number","unit":"units","decimals":4,"description":"Radius of the circumscribed circle = a·b·c / (4 · area)."},{"name":"side_type","label":"Type by sides","type":"string","decimals":4,"description":"equilateral, isosceles or scalene."},{"name":"angle_type","label":"Type by angles","type":"string","decimals":4,"description":"acute, right or obtuse."},{"name":"method","label":"Method","type":"string","decimals":4,"description":"SSS or SAS."}],"input_schema":{"type":"object","properties":{"side_a":{"description":"First side. Unit: units.","type":"number","exclusiveMinimum":0,"examples":[3],"x-unit":"units"},"side_b":{"description":"Second side. Unit: units.","type":"number","exclusiveMinimum":0,"examples":[4],"x-unit":"units"},"side_c":{"description":"Third side, opposite the angle between a and b (SSS). Omit for SAS. Unit: units.","type":"number","exclusiveMinimum":0,"examples":[5],"x-unit":"units"},"angle_c_deg":{"description":"Included angle between side_a and side_b in degrees (SAS). Omit when side_c is given. Unit: degrees.","type":"number","exclusiveMinimum":0,"exclusiveMaximum":180,"examples":[90],"x-unit":"degrees"}},"additionalProperties":false,"required":["side_a","side_b"]},"output_schema":{"type":"object","properties":{"side_a":{"description":"Side opposite angle A. Unit: units.","type":"number","x-unit":"units"},"side_b":{"description":"Side opposite angle B. Unit: units.","type":"number","x-unit":"units"},"side_c":{"description":"Side opposite angle C (computed for SAS). Unit: units.","type":"number","x-unit":"units"},"angle_a_deg":{"description":"Angle opposite side_a. Unit: degrees.","type":"number","x-unit":"degrees"},"angle_b_deg":{"description":"Angle opposite side_b. Unit: degrees.","type":"number","x-unit":"degrees"},"angle_c_deg":{"description":"Angle opposite side_c. Unit: degrees.","type":"number","x-unit":"degrees"},"perimeter":{"description":"side_a + side_b + side_c. Unit: units.","type":"number","x-unit":"units"},"area":{"description":"½ · side_a · side_b · sin C. Unit: units².","type":"number","x-unit":"units²"},"inradius":{"description":"Radius of the inscribed circle = area / semiperimeter. Unit: units.","type":"number","x-unit":"units"},"circumradius":{"description":"Radius of the circumscribed circle = a·b·c / (4 · area). Unit: units.","type":"number","x-unit":"units"},"side_type":{"description":"equilateral, isosceles or scalene.","type":"string"},"angle_type":{"description":"acute, right or obtuse.","type":"string"},"method":{"description":"SSS or SAS.","type":"string"}}},"formula":"SAS: side_c = √(a² + b² − 2·a·b·cos C). Angles by the law of cosines: cos A = (b² + c² − a²) / (2·b·c), cos B = (a² + c² − b²) / (2·a·c), C = 180° − A − B. area = ½·a·b·sin C; inradius = area / s with s = perimeter / 2; circumradius = a·b·c / (4·area).","method":"Sides must satisfy the triangle inequality. A triangle is classified as right when its largest angle is within 1e-6° of 90°, so rounded side lengths such as 1, 1, 1.4142 classify as acute.","sources":[{"name":"Wikipedia – Law of cosines","url":"https://en.wikipedia.org/wiki/Law_of_cosines","type":"reference","retrieved_at":"2026-09-23"},{"name":"Wikipedia – Solution of triangles","url":"https://en.wikipedia.org/wiki/Solution_of_triangles","type":"reference","retrieved_at":"2026-09-23"},{"name":"Wolfram MathWorld – Law of Cosines","url":"https://mathworld.wolfram.com/LawofCosines.html","type":"reference","retrieved_at":"2026-09-23"}],"freshness":{"type":"static","max_age_seconds":null,"note":"Deterministic formula with fixed constants; results never go stale. Inputs supplied by the caller determine the output."},"examples":[{"name":"Sides 3, 4, 5 (SSS)","inputs":{"side_a":3,"side_b":4,"side_c":5},"expected":{"angle_a_deg":36.8699,"angle_b_deg":53.1301,"angle_c_deg":90,"perimeter":12,"area":6,"inradius":1,"circumradius":2.5,"side_type":"scalene","angle_type":"right","method":"SSS"},"url":"https://tttkmbb.com/api/v1/calculate/triangle-solver?side_a=3&side_b=4&side_c=5"},{"name":"Sides 5 and 7 with 60° between them (SAS)","inputs":{"side_a":5,"side_b":7,"angle_c_deg":60},"expected":{"side_c":6.245,"angle_a_deg":43.8979,"angle_b_deg":76.1021,"angle_c_deg":60,"perimeter":18.245,"area":15.1554,"inradius":1.6613,"circumradius":3.6056,"side_type":"scalene","angle_type":"acute","method":"SAS"},"url":"https://tttkmbb.com/api/v1/calculate/triangle-solver?side_a=5&side_b=7&angle_c_deg=60"},{"name":"Equilateral, side 5","inputs":{"side_a":5,"side_b":5,"side_c":5},"expected":{"angle_a_deg":60,"area":10.8253,"inradius":1.4434,"circumradius":2.8868,"side_type":"equilateral","angle_type":"acute"},"url":"https://tttkmbb.com/api/v1/calculate/triangle-solver?side_a=5&side_b=5&side_c=5"}],"faq":[{"q":"Where is angle C?","a":"Between side_a and side_b, opposite side_c. For SAS enter that included angle; a non-included angle (SSA) can give two solutions and is not supported here."},{"q":"Why do I get a triangle inequality error?","a":"No triangle exists when one side is as long as or longer than the other two together, e.g. 1, 2, 10. Check the units and the order of the sides."}],"tags":["triangle solver","law of cosines","sss","sas","triangle angles","solve triangle"],"related":[{"calculator_id":"triangle-area","reason":"Area only, including the base-and-height method."},{"calculator_id":"right-triangle","reason":"Simpler solver for right-angled triangles."},{"calculator_id":"angle","reason":"Convert the angles to radians or gradians."}],"links":{"html":"https://tttkmbb.com/geometry/triangle-solver","markdown":"https://tttkmbb.com/geometry/triangle-solver.md","json":"https://tttkmbb.com/geometry/triangle-solver.json","api":"https://tttkmbb.com/api/v1/calculate/triangle-solver","schema":"https://tttkmbb.com/api/v1/calculators/triangle-solver","openapi":"https://tttkmbb.com/openapi.json","mcp":"https://tttkmbb.com/mcp"},"version":"v1","updated_at":"2026-09-23"},"timestamp":"2026-09-23T23:24:43Z","next_actions":[{"tool":"run_calculator","calculator_id":"triangle-solver","reason":"Run Triangle Solver with the inputs above."}],"links":{"markdown":"https://tttkmbb.com/geometry/triangle-solver.md"}}