# Pythagorean theorem calculator > How long is the missing side of a right triangle? Find the hypotenuse or a leg with a² + b² = c², shown with the squares on each side. Find the hypotenuse or a missing leg of a right triangle with a² + b² = c², plus area, perimeter and angles, drawn to scale with a square on every side. - Page: https://how.box/pythagoras/ - Runs entirely in the browser. - License: HowToolbox's own text and data (titles, explanations, FAQs, tool descriptions and schemas, this file) are CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/); AI training and answers are welcome. Attribute "HowToolbox (how.box)" with a link to the page used. Third-party data keeps its own terms; the name and logo are not licensed. Publisher: HowToolbox, contact@how.box. Terms: https://how.box/about/terms/ ## Inputs Answer link: https://how.box/pythagoras/?s={s}&a={a}&b={b}&c={c}&u={u} - `s` (c, a or b): The side to find: c (default), a or b. Example: `c`. - `a` (number 0 to 1e9): Leg a (ignored when s is a). Example: `3`. - `b` (number 0 to 1e9): Leg b (ignored when s is b). Example: `4`. - `c` (number 0 to 1e9): Hypotenuse c (ignored when s is c). Example: `5`. - `u` (none, mm, cm, m, km, in, ft, yd or mi): Unit shown with the lengths: none, mm, cm, m, km, in, ft, yd or mi. Example: `cm`. Example answer: https://how.box/pythagoras/?s=c&a=3&b=4&c=5&u=cm A complete link carries the primary answer in the page HTML; a missing or invalid value shows the default page. ## Agent tools - `pythagoras_calculate`: Right triangle by a² + b² = c². - MCP, one POST to https://how.box/mcp: `{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"pythagoras_calculate","arguments":{"solve":"c","a":3,"b":4,"c":5,"unit":"cm"}}}` - GET: https://how.box/mcp/run/pythagoras_calculate?solve=c&a=3&b=4&c=5&unit=cm ## How it works In every right triangle, the square drawn on the longest side has exactly the same area as the squares on the two shorter sides together. That is the Pythagorean theorem, a² + b² = c², where a and b are the legs at the right angle and c is the hypotenuse across from it. The drawing shows it to scale. So the hypotenuse is c = √(a² + b²), and a leg is a = √(c² − b²). With legs 3 and 4: 3² + 4² = 9 + 16 = 25, so c = √25 = 5. Whole numbers that fit like 3, 4, 5 or 5, 12, 13 are Pythagorean triples; builders use 3-4-5 to check that a corner is square. The rule holds only for right angles; for other triangles use the law of cosines. A leg needs a hypotenuse longer than the other leg. Results are rounded to six significant digits. Sources: Euclid, Elements I.47; OpenStax Prealgebra 2e, section 9.3. ## FAQ **Does it matter which short side I call a or b?** No. Swapping the legs leaves the hypotenuse, area and perimeter unchanged. It swaps the labels of the two acute angles. **How do I check that a corner is square?** Measure 3 units along one wall and 4 along the other. If the diagonal between the marks is exactly 5, the corner is 90°. Multiples such as 60, 80 and 100 cm work the same way. **Can the answer be a decimal even if both inputs are whole numbers?** Yes. Most whole-number pairs do not form a Pythagorean triple, so the square root need not be a whole number. The displayed decimal is rounded. **How do I find the diagonal of a rectangle or a screen?** The diagonal is the hypotenuse of a right triangle whose legs are the width and the height: for a 16 × 9 rectangle it is √(256 + 81) ≈ 18.36. **Can the two legs use different units?** Convert both lengths to the same unit first. The unit selector labels the result; it does not convert a mixture of input units. More: [HowToolbox index](https://how.box/llms.txt) · [Agent Skill](https://how.box/skill.md) · [agent terms](https://how.box/about/agents/)