Skip to content
TheCalcUniverse

Right Triangle Calculator — Quick & Accurate Online Calculator & Guide

Solve right triangles using the Pythagorean theorem and SOH CAH TOA trigonometry. Find sides, angles, area, and perimeter with a dynamic SVG triangle and.

✓ Tested formula & cited sources Formula verified 2026-01-15 Runs in your browser — inputs never sent anywhere

See it worked out

Example — Leg a 3, Leg b 4, Hypotenuse c 5:

Hypotenuse (c)

5

Triangle Area

6

Perimeter

12

Angle A (opposite leg a)

36.8699°

Angle B (opposite leg b)

53.1301°

SOH Step

sin(α) = opposite/hypotenuse = a/c = 3/5 = 0.6000 → α = 36.87°

CAH Step

cos(α) = adjacent/hypotenuse = b/c = 4/5 = 0.8000 → α = 36.87°

TOA Step

tan(α) = opposite/adjacent = a/b = 3/4 = 0.7500 → α = 36.87°

The formula

a² + b² = c² → c = √(a² + b²), a = √(c² − b²), b = √(c² − a²)

a, b
Legs
c
Hypotenuse
α, β
Acute Angles

Worked example — Leg a 3, Leg b 4, Hypotenuse c 5

Hypotenuse (c) = 5

Full explanation ↓

How Right Triangle Works

a² + b² = c² → c = √(a² + b²), a = √(c² − b²), b = √(c² − a²)

The Pythagorean theorem states that in any right triangle, the square of the hypotenuse equals the sum of the squares of the two legs. The formula can be rearranged to solve for any side: c = √(a² + b²) when solving for the hypotenuse, or a = √(c² − b²) when solving for a leg. Combined with SOH CAH TOA trigonometry, you can also find all angles of any right triangle from just two side lengths.

a, b
LegsThe two shorter sides that form the 90° right angle. Interchangeable in the formula.
c
HypotenuseThe longest side, always opposite the 90° right angle. Always the largest value.
α, β
Acute AnglesThe two acute angles opposite legs a and b respectively. Always sum to 90°.
The Pythagorean theorem relates the three sides of any right triangle.

How to Use

  1. Select what you want to find — hypotenuse, leg a, leg b, or the acute angles.
  2. Enter the known values for the other two sides or angle.
  3. View the missing side, calculated area, perimeter, and both acute angles.
  4. The SOH CAH TOA trigonometry steps show exactly how each angle is derived from the side ratios.
  5. The SVG right triangle dynamically scales based on the side lengths, showing labeled sides and angles.

Understanding the Result

The Pythagorean theorem is one of the most fundamental relationships in Euclidean geometry, with a history dating back over 3,500 years to Babylonian mathematics. It applies exclusively to right triangles (triangles with one 90° angle). The theorem states that the area of the square on the hypotenuse equals the sum of the areas of the squares on the two legs — a² + b² = c². When solving for a leg, the formula is rearranged to a = √(c² − b²). The angles are found using SOH CAH TOA trigonometry: sin(α) = opposite/hypotenuse, cos(α) = adjacent/hypotenuse, tan(α) = opposite/adjacent. The theorem has practical applications in construction (squaring corners), navigation (shortest distances), physics (vector magnitudes, projectile motion), and computer graphics (distance calculations, collision detection). The Pythagorean theorem is so fundamental that it appears in nearly every branch of mathematics and science.

Frequently Asked Questions

What are Pythagorean triples?
Sets of three positive integers where a² + b² = c² exactly. The simplest and most well-known is 3-4-5 (9 + 16 = 25). Any multiple of a Pythagorean triple is also a triple (6-8-10, 9-12-15, etc.). Other common triples include 5-12-13, 8-15-17, and 7-24-25. There are infinitely many Pythagorean triples, and they can be generated using Euclid's formula.
Does the theorem work for non-right triangles?
No. The Pythagorean theorem only applies to right triangles. For other triangles, use the Law of Cosines: c² = a² + b² − 2ab·cos(C), which is a generalization. When angle C = 90°, cos(90°) = 0, and the Law of Cosines reduces to the Pythagorean theorem — showing that Pythagoras is a special case of the more general relationship.
How do I find the angles of a right triangle?
Use SOH CAH TOA trigonometry. If you know the sides, sin(α) = a/c (opposite/hypotenuse), cos(α) = b/c (adjacent/hypotenuse), or tan(α) = a/b (opposite/adjacent). Take the inverse sine (arcsin), inverse cosine (arccos), or inverse tangent (arctan) of the ratio to find the angle in degrees or radians. The calculator shows all three trig steps and their corresponding inverse functions.
What is SOH CAH TOA?
A mnemonic device for remembering right triangle trigonometry: Sine = Opposite / Hypotenuse, Cosine = Adjacent / Hypotenuse, Tangent = Opposite / Adjacent. Given any two sides of a right triangle, SOH CAH TOA lets you find any angle by choosing the appropriate ratio. For example, if you know the opposite and adjacent sides, use TOA (tangent) to find the angle.
How is the Pythagorean theorem used in real-world applications?
Construction workers use it to ensure corners are square (a 3-4-5 measurement guarantees a right angle). GPS systems use it for trilateration calculations. Computer graphics rely on it for calculating distances between objects, rendering 3D scenes, and detecting collisions. In physics, it calculates vector magnitudes, resultants of forces, and projectile trajectories. Even screen size measurements (e.g., a 27-inch monitor is measured diagonally using the theorem on the width and height).
Was this calculator helpful?
Cite this calculator

TheCalcUniverse. "Right Triangle Calculator — Quick & Accurate Online Calculator & Guide." TheCalcUniverse, 2026, https://thecalcuniverse.com/math/pythagorean-theorem-calculator/. Accessed July 24, 2026.

Embed this calculator on your site

Free to embed. Paste this into any HTML page — it stays up to date automatically.

Open embed ↗

You may also like

Guides that use this calculator