{"success":true,"version":"v1","request":{"tool":"get_calculator_schema","calculator_id":"right-triangle"},"result":{"entity_type":"calculator","id":"right-triangle","calculator_id":"right-triangle","canonical_url":"https://tttkmbb.com/geometry/right-triangle","name":"Right Triangle Calculator","title":"Right Triangle Calculator – Sides, Angles, Area and Perimeter from Any Two Sides","category":"geometry","category_name":"Geometry","tool_name":"solve_right_triangle","featured_mcp_tool":false,"description":"Solves a right triangle from any two of its sides (two legs, or one leg and the hypotenuse) using the Pythagorean theorem, and returns all sides, the two acute angles in degrees, area, perimeter and the altitude to the hypotenuse.","use_when":"You know two sides of a right-angled triangle and need the third side, the angles or the area.","do_not_use_when":"The triangle has no right angle (use triangle-solver) or you only need the hypotenuse length (pythagorean gives just that).","inputs":[{"name":"leg_a","label":"Leg a","type":"number","unit":"units","required":false,"exclusive_min":0,"description":"First leg (side adjacent to the right angle).","example":3},{"name":"leg_b","label":"Leg b","type":"number","unit":"units","required":false,"exclusive_min":0,"description":"Second leg (side adjacent to the right angle).","example":4},{"name":"hypotenuse","label":"Hypotenuse","type":"number","unit":"units","required":false,"exclusive_min":0,"description":"Side opposite the right angle; must be longer than either leg.","example":5}],"outputs":[{"name":"leg_a","label":"Leg a","type":"number","unit":"units","decimals":4,"description":"First leg."},{"name":"leg_b","label":"Leg b","type":"number","unit":"units","decimals":4,"description":"Second leg."},{"name":"hypotenuse","label":"Hypotenuse","type":"number","unit":"units","decimals":4,"description":"√(leg_a² + leg_b²)."},{"name":"angle_a_deg","label":"Angle opposite leg a","type":"number","unit":"degrees","decimals":4,"description":"Acute angle opposite leg_a = atan(leg_a / leg_b)."},{"name":"angle_b_deg","label":"Angle opposite leg b","type":"number","unit":"degrees","decimals":4,"description":"Acute angle opposite leg_b = 90 − angle_a_deg."},{"name":"area","label":"Area","type":"number","unit":"units²","decimals":4,"description":"leg_a × leg_b / 2."},{"name":"perimeter","label":"Perimeter","type":"number","unit":"units","decimals":4,"description":"leg_a + leg_b + hypotenuse."},{"name":"altitude_to_hypotenuse","label":"Altitude to hypotenuse","type":"number","unit":"units","decimals":4,"description":"Height from the right angle onto the hypotenuse = leg_a × leg_b / hypotenuse."}],"input_schema":{"type":"object","properties":{"leg_a":{"description":"First leg (side adjacent to the right angle). Unit: units.","type":"number","exclusiveMinimum":0,"examples":[3],"x-unit":"units"},"leg_b":{"description":"Second leg (side adjacent to the right angle). Unit: units.","type":"number","exclusiveMinimum":0,"examples":[4],"x-unit":"units"},"hypotenuse":{"description":"Side opposite the right angle; must be longer than either leg. Unit: units.","type":"number","exclusiveMinimum":0,"examples":[5],"x-unit":"units"}},"additionalProperties":false},"output_schema":{"type":"object","properties":{"leg_a":{"description":"First leg. Unit: units.","type":"number","x-unit":"units"},"leg_b":{"description":"Second leg. Unit: units.","type":"number","x-unit":"units"},"hypotenuse":{"description":"√(leg_a² + leg_b²). Unit: units.","type":"number","x-unit":"units"},"angle_a_deg":{"description":"Acute angle opposite leg_a = atan(leg_a / leg_b). Unit: degrees.","type":"number","x-unit":"degrees"},"angle_b_deg":{"description":"Acute angle opposite leg_b = 90 − angle_a_deg. Unit: degrees.","type":"number","x-unit":"degrees"},"area":{"description":"leg_a × leg_b / 2. Unit: units².","type":"number","x-unit":"units²"},"perimeter":{"description":"leg_a + leg_b + hypotenuse. Unit: units.","type":"number","x-unit":"units"},"altitude_to_hypotenuse":{"description":"Height from the right angle onto the hypotenuse = leg_a × leg_b / hypotenuse. Unit: units.","type":"number","x-unit":"units"}}},"formula":"hypotenuse² = leg_a² + leg_b²; angle_a_deg = atan(leg_a / leg_b); angle_b_deg = 90 − angle_a_deg; area = leg_a × leg_b / 2; altitude = leg_a × leg_b / hypotenuse","sources":[{"name":"Wikipedia – Right triangle","url":"https://en.wikipedia.org/wiki/Right_triangle","type":"reference","retrieved_at":"2026-09-23"},{"name":"Wikipedia – Pythagorean theorem","url":"https://en.wikipedia.org/wiki/Pythagorean_theorem","type":"reference","retrieved_at":"2026-09-23"},{"name":"Wolfram MathWorld – Right Triangle","url":"https://mathworld.wolfram.com/RightTriangle.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":"Legs 3 and 4","inputs":{"leg_a":3,"leg_b":4},"expected":{"hypotenuse":5,"angle_a_deg":36.8699,"angle_b_deg":53.1301,"area":6,"perimeter":12,"altitude_to_hypotenuse":2.4},"url":"https://tttkmbb.com/api/v1/calculate/right-triangle?leg_a=3&leg_b=4"},{"name":"Leg 5, hypotenuse 13","inputs":{"leg_a":5,"hypotenuse":13},"expected":{"leg_b":12,"angle_a_deg":22.6199,"angle_b_deg":67.3801,"area":30,"perimeter":30},"url":"https://tttkmbb.com/api/v1/calculate/right-triangle?leg_a=5&hypotenuse=13"}],"faq":[{"q":"Which angle is angle_a_deg?","a":"The angle opposite leg_a (at the vertex where leg_b meets the hypotenuse). The two acute angles always add up to 90°."},{"q":"What if I enter all three sides?","a":"They must satisfy leg_a² + leg_b² = hypotenuse² (to 0.01 %); otherwise an INVALID_PARAMETER error is returned. Give just two sides to avoid this."}],"tags":["right triangle","pythagorean theorem","hypotenuse","trigonometry","legs"],"related":[{"calculator_id":"triangle-solver","reason":"Solve triangles that are not right-angled."},{"calculator_id":"triangle-area","reason":"Area only, by any of three methods."},{"calculator_id":"pythagorean","reason":"Just the hypotenuse or a leg from the Pythagorean theorem."}],"links":{"html":"https://tttkmbb.com/geometry/right-triangle","markdown":"https://tttkmbb.com/geometry/right-triangle.md","json":"https://tttkmbb.com/geometry/right-triangle.json","api":"https://tttkmbb.com/api/v1/calculate/right-triangle","schema":"https://tttkmbb.com/api/v1/calculators/right-triangle","openapi":"https://tttkmbb.com/openapi.json","mcp":"https://tttkmbb.com/mcp"},"version":"v1","updated_at":"2026-09-23"},"timestamp":"2026-09-23T23:23:50Z"}