---
title: "Solve for any side of a right triangle using the Pythagorean theorem (a² + b² = c²). Provide any two of the three sides (a, b, c) and the missing side is computed. Also returns the triangle area (0.5 * a * b), perimeter, and confirms it is a right triangle. Side c is always the hypotenuse. Fundamental to surveying, construction (squaring corners), navigation (distance calculations), physics (vector decomposition), and 3D graphics. Chain with slope_calc for coordinate geometry or square_root for simplified radical answers."
method: POST
path: "/api/pythagorean_theorem"
tags: ["general"]
---

# Solve for any side of a right triangle using the Pythagorean theorem (a² + b² = c²). Provide any two of the three sides (a, b, c) and the missing side is computed. Also returns the triangle area (0.5 \* a \* b), perimeter, and confirms it is a right triangle. Side c is always the hypotenuse. Fundamental to surveying, construction (squaring corners), navigation (distance calculations), physics (vector decomposition), and 3D graphics. Chain with slope_calc for coordinate geometry or square_root for simplified radical answers.

`POST /api/pythagorean_theorem`

## Request

- Base URL: `https://calc.engineer`
- URL: `https://calc.engineer/api/pythagorean_theorem`
- Auth: none declared

## Request body

- object
  - `a` number: Length of side a (leg)
  - `b` number: Length of side b (leg)
  - `c` number: Length of side c (hypotenuse)

## Response `200`

Computed result for pythagorean_theorem

- object
  - `result` object, required
    - `a` number, required: Length of side a
    - `b` number, required: Length of side b
    - `c` number, required: Length of side c (hypotenuse)
    - `area` number, required: Area of the right triangle (0.5 * a * b)
    - `perimeter` number, required: Perimeter of the triangle (a + b + c)
    - `is_right_triangle` boolean, required: Always true when computed from two sides
  - `tool` string, required
  - `version` string, required
  - `computed_at` string, date-time, required
  - `chain` object, required
    - `feeds` unknown[]
      - unknown
    - `accepts_from` unknown[]
      - unknown

## Other responses

- `400`: Validation error or invalid JSON
- `404`: Tool not found

---

[API](https://skmtc.dev/calc/apis/calc-engineer-api.md) · [All operations](https://skmtc.dev/calc/apis/calc-engineer-api/llms.txt) · [OpenAPI document](https://skmtc.dev/calc/apis/calc-engineer-api/revisions/8830480ec488?raw)
