Pythagorean Theorem Calculator
Enter any two sides of a right triangle, the legs a and b or a leg and the hypotenuse c, and get the third side, the two acute angles
Try your own numbers
Estimate only. Not engineering or safety advice. Check the result against the applicable standard and the equipment data, and have a competent engineer review it before it is relied on. Terms of use.
Open in the calculator with these values
About this calculator
This page calculates side a, side b, hypotenuse c and 4 more results from side a, side b and side c. Change any value or its unit and the result updates. The steps below show the working for the default values, so you can check each line against your own method.
Limits of this calculator
Use this to find the diagonal of a rectangular panel or a trench, the length of a sloping cable run from its horizontal and vertical parts, the length of a guy wire, or the missing side of a right-angled impedance or power triangle. To work out the sides of any triangle from its three sides use the triangle calculator.
Cross-check: 38 reference cases, calculated from textbook formulas coded separately from the engine by the same author, agree with this calculator. This is not an independent review.
Verification status: Engineering reference
Engineering reference. Formula and method documented and tested against separately coded reference calculations. Not yet Verified: the evidence listed on this page is still needed.
What this calculator checks
- The arithmetic of the published formula for the values you entered, in the units shown.
What remains unverified
- That the inputs suit your application. Take ratings, resistances and constants from the manufacturer data sheet or project specification.
Verification register entry
| Calculation author | Rahul Sharma (author) |
|---|---|
| Technical review | No independent technical review has been carried out |
| Individual professional approval | Not recorded |
| Formula reference | not recorded |
| Standard and edition | Not applicable: Pure mathematics or statistics; no electrical standard governs the method |
| Standard review state | Not applicable |
| Scope-screening note | not recorded |
| Cross-check test cases | 38 reference vectors (tests/reference_vectors.json) |
| Review date | not recorded |
| Next review date | not recorded |
| Status | Engineering reference |
Needed before this calculator can be marked Verified: reviewer name, qualification and review date; exact formula reference; formula source (textbook or standard); next review date.
Formula
Worked example
| Input | Value |
|---|---|
| Side a (a leg) | 3 |
| Side b (the other leg) | 4 |
- Given two sides, the third is found from a² + b² = c²: c = √(a² + b²)
- a = 3 b = 4 c = 5
- Angle A = atan(a / b) = 36.86989765° Angle B = atan(b / a) = 53.13010235°
- Area = a × b / 2 = 6 Perimeter = a + b + c = 12
Assumptions
- The triangle has one right angle (90°); c is the longest side, opposite it, and a and b are the two legs
- Exactly two sides must be entered. The side left blank is found; entering all three, or only one, is rejected
- When the hypotenuse is entered it must be longer than the leg entered with it, because the hypotenuse is always the longest side
- The tool works on plain numbers and does not track units: enter both sides in the same unit; the area is in that unit squared
- The two acute angles add up to 90°
Use this to find the diagonal of a rectangular panel or a trench, the length of a sloping cable run from its horizontal and vertical parts, the length of a guy wire, or the missing side of a right-angled impedance or power triangle. To work out the sides of any triangle from its three sides use the triangle calculator.
Inputs and results
| Input | Unit | Allowed or shown | Note |
|---|---|---|---|
| Side a (a leg) | (number) | 0 or more, up to 1,000,000,000,000; may be left blank | Enter exactly two of the three sides and leave the one you want to find blank. All must be above zero, in one consistent unit. |
| Side b (the other leg) | (number) | 0 or more, up to 1,000,000,000,000; may be left blank | |
| Side c (the hypotenuse) | (number) | 0 or more, up to 1,000,000,000,000; may be left blank | The longest side, opposite the right angle. |
| Result | Unit | Allowed or shown | Note |
|---|---|---|---|
| Side a | (number) | Shown to 10 decimal places | |
| Side b | (number) | Shown to 10 decimal places | |
| Hypotenuse c | (number) | Shown to 10 decimal places | |
| Angle A, opposite side a (degrees) | (number) | Shown to 8 decimal places | |
| Angle B, opposite side b (degrees) | (number) | Shown to 8 decimal places | |
| Area | (number) | Shown to 10 decimal places | |
| Perimeter | (number) | Shown to 10 decimal places |
How it is calculated
Each input is converted to the base unit of its quantity, the formula above is applied in the order shown in the worked example, and each result is shown in the unit you choose. Results are held at full precision and rounded only for display, except where a step selects a standard size, as the worked example shows. A value outside its allowed range is refused with a message instead of giving a result.
How the result changes with side a (a leg)
| Side a (a leg) | Side a | Side b | Hypotenuse c |
|---|---|---|---|
| 0.3 | 0.3 | 4 | 4.011234224 |
| 0.75 | 0.75 | 4 | 4.069705149 |
| 1.5 | 1.5 | 4 | 4.2720018727 |
| 3 | 3 | 4 | 5 |
| 6 | 6 | 4 | 7.2111025509 |
| 12 | 12 | 4 | 12.6491106407 |
| 30 | 30 | 4 | 30.2654919008 |
Other inputs are the same as in the worked example above.
Standards and further reading
Complex numbers, rectangular and polar form and angle conversion are standard mathematics, not the subject of a standard. Standards apply when the result feeds an electrical design, and they set the method there.
Frequently asked questions
What do I need to enter?
Enter side a (a leg), side b (the other leg) and side c (the hypotenuse). Change the unit of a value with its selector and the result stays the same.
What does this calculator assume?
The triangle has one right angle (90°); c is the longest side, opposite it, and a and b are the two legs. Exactly two sides must be entered. The side left blank is found; entering all three, or only one, is rejected. When the hypotenuse is entered it must be longer than the leg entered with it, because the hypotenuse is always the longest side. The tool works on plain numbers and does not track units: enter both sides in the same unit; the area is in that unit squared. The two acute angles add up to 90°.
Which calculators should I use next?
Common next steps are Triangle Calculator (Three Sides), Trigonometry (Sin, Cos, Tan), Complex Numbers (Rectangular and Polar) and Circle Calculator (Radius, Diameter, Circumference, Area). The related links at the bottom of this page open them.
How accurate are the results?
Every figure comes from the same tested engine as the Elecmetric calculators and is meant for estimating. 38 reference cases, calculated from textbook formulas coded separately from the engine by the same author, agree with this calculator. This is not an independent review. Check design values against the standard and the equipment data you work to.
Formula guides and reference
Longer explanations with worked examples and tables, written for the same topic.
- Trigonometry Formulas for Electrical Engineers: Sine, cosine and tangent formulas for engineers: the six trig functions, degrees and radians
- AC Circuit Formulas: Reactance and Impedance: AC circuit formulas: RMS and peak, frequency and period, inductive and capacitive reactance
- Power Factor and the Power Triangle: Power factor formulas: kW, kVA and kVAR from the power triangle, capacitor kVAR to raise power factor
More Engineering Mathematics calculatorsAll engineering calculatorsPythagorean Theorem (Right Triangle) Calculator in Elecmetric