Pythagorean Theorem Calculator

Calculate the hypotenuse or legs of a right triangle using the Pythagorean theorem. Free online calculator with step-by-step solutions, SVG diagram, and radical support.

Input Known Sides(at least two)
💡 Tip: You can enter "2√5" directly in the main field, or use the separate radical box.
ResultsPrecise
Click "Calculate" to see the detailed steps.

Recent Calculations

No calculations yet — your last 6 will show up here.

Pythagorean Theorem Calculator

This free online Pythagorean theorem calculator solves for the hypotenuse or legs of a right triangle instantly in your browser, with no signup, no ads, and no server uploads.

What is the Pythagorean Theorem? The Pythagorean Theorem, also known as Pythagoras' theorem, is a fundamental relation in Euclidean geometry between the three sides of a right triangle. It states that the area of the square formed by the hypotenuse (the longest side) is equal to the sum of the areas of the squares formed by the other two sides:

$$a^2 + b^2 = c^2$$

where $c$ is the length of the hypotenuse and $a$ and $b$ are the lengths of the other two sides (the legs).

How to use this calculator Enter any two side lengths of a right triangle. The calculator will automatically determine the third side using the appropriate formula:

- If entering $a$ and $b$: $c = \sqrt{a^2 + b^2}$ (find the hypotenuse) - If entering $a$ and $c$: $b = \sqrt{c^2 - a^2}$ (find a leg) - If entering $b$ and $c$: $a = \sqrt{c^2 - b^2}$ (find a leg)

The calculator supports input with radicals (e.g., $2\sqrt{5}$, $\sqrt{2}$) and displays results with angles in degrees, minutes, seconds format, as well as radians. The step-by-step solution shows each stage of the calculation.

Visual diagram An SVG diagram of the right triangle updates dynamically with your values, labeling all three sides and the right angle.
Applications The Pythagorean theorem is used across many fields: construction (squaring foundations), navigation (calculating distances), computer graphics (distance between points), physics (vector magnitudes), and more.
Privacy & Performance All calculations run locally in your browser. No data is transmitted, logged, or stored on any server. Results appear instantly with no page reloads.
🔒 Client-side only⚡ Web Worker processing🌐 Works offline🛡️ Zero server logs

Frequently Asked Questions

Got questions about the Pythagorean theorem, right triangles, or how to use this tool? We've got answers.

What is the Pythagorean theorem?

The Pythagorean theorem states that in a right triangle, the square of the hypotenuse (the side opposite the 90° angle) equals the sum of the squares of the other two sides: $a^2 + b^2 = c^2$. It is one of the most fundamental relations in geometry.

How do I find the hypotenuse?

If you know both legs (a and b), the hypotenuse is $c = \sqrt{a^2 + b^2}$. Enter values for sides a and b above, leave c empty, and click Calculate.

How do I find a missing leg (a or b)?

If you know the hypotenuse (c) and one leg (a or b), the missing leg is $a = \sqrt{c^2 - b^2}$ or $b = \sqrt{c^2 - a^2}$. Enter the two known sides and leave the unknown one empty.

Can I enter numbers with square roots?

Yes. You can enter values like "2√5" or "√2" directly in the input field. Alternatively, use the √ box next to each input field to specify just the radicand. For example, enter "2" in the main field and "5" in the √ box for 2√5.

What is a Pythagorean triple?

A Pythagorean triple is a set of three integers (a, b, c) that satisfy $a^2 + b^2 = c^2$, such as (3, 4, 5), (5, 12, 13), or (8, 15, 17). These have been studied since ancient times.

How does the Law of Cosines relate?

The Law of Cosines $c^2 = a^2 + b^2 - 2ab\cos(\gamma)$ is a generalization of the Pythagorean theorem for any triangle. When $\gamma = 90°$, $\cos(90°) = 0$, and the equation reduces to $a^2 + b^2 = c^2$.

Is this calculator private?

Yes. All calculations run locally in your browser. No data is transmitted, logged, or stored on any server.