Math calculator

Free right triangle calculator

Solve any right triangle from two known sides or angles — enter your values to find all sides, angles, and area, updated live, as you type.

InputsLive
Side a
Side b
Hypotenuse (c)
Leave one field blank to solve for it.
Result
Hypotenuse (c)
5
a = 3, b = 4, c = 5
Side a3
Side b4
Side c5
Angle A (°)36.8699
Angle B (°)53.1301
Area6
Perimeter12

Pythagorean theorem: a² + b² = c². Angles A and B are in degrees. C = 90°.

Results are estimates. Consult a professional.

How it's calculated

How the right triangle calculator works

A right triangle contains one 90° angle. Given any two sides, the Pythagorean theorem finds the third. Given a side and an angle, the trigonometric ratios (sin, cos, tan) determine the remaining sides and angles. The three angles always sum to 180°.

Pythagorean theorem: c² =+
→ hypotenuse: c = √(a² + b²)
Trigonometric ratios:
sin θ = opposite / hypotenuse
cos θ = adjacent / hypotenuse
tan θ = opposite / adjacent
Angle sum: A + B + 90° = 180° → A + B = 90°
Khan Academy — Pythagorean theorem and trigonometry
Example

Worked example: legs a = 6, b = 8

Example: Legs a = 6, b = 8 — find hypotenuse and all angles

The classic 3-4-5 scaled to 6-8-10 right triangle. Starting from two legs, we find the hypotenuse using the Pythagorean theorem, then derive both acute angles using inverse tangent.

Hypotenuse: c = √(6² + 8²) = √(36 + 64) = √100 = 10
Angle A (opposite leg a = 6):
tan A = 6 / 8 = 0.75 → A = arctan(0.75) ≈ 36.87°
Angle B (opposite leg b = 8):
B = 90° A = 90° 36.87° = 53.13°
Check: tan B = 8 / 6 ≈ 1.333 → arctan(1.333) ≈ 53.13° ✓
c = 10, A = 36.87°, B = 53.13°
Hypotenuse = 10 units, angle A ≈ 36.87°, angle B ≈ 53.13°. This is the 6-8-10 Pythagorean triple, a scaled version of the classic 3-4-5 triangle.
Quick reference

Common right triangle types

Certain right triangles appear so often in geometry and construction that their side ratios and angles are worth memorising. Pythagorean triples always give integer side lengths.

Triangle typeAnglesSide ratio
3-4-5 triple≈ 36.87° / 53.13° / 90°3 : 4 : 5
5-12-13 triple≈ 22.62° / 67.38° / 90°5 : 12 : 13
8-15-17 triple≈ 28.07° / 61.93° / 90°8 : 15 : 17
45-45-9045° / 45° / 90°1 : 1 : √2 ≈ 1.414
30-60-9030° / 60° / 90°1 : √3 : 2 ≈ 1 : 1.732 : 2

Source: standard Euclidean geometry and Pythagorean triples

Practical tips

Tips for right triangle problems

Right triangles underpin construction, navigation, surveying, and physics. Getting the formula and angle interpretation right is essential for accurate results.

  • SOHCAHTOA as a mnemonic — Sin = Opposite/Hypotenuse, Cos = Adjacent/Hypotenuse, Tan = Opposite/Adjacent. Write it down until it's automatic.
  • Hypotenuse is always the longest side — it sits opposite the 90° angle. If your computed hypotenuse is shorter than either leg, check whether you squared instead of taking the square root.
  • Use arctan to find an angle from two sides — if you know opposite and adjacent lengths, the angle is arctan(opposite/adjacent). Most calculators label this tan⁻¹.
  • Confirm your angle mode — scientific calculators default to radians or degrees depending on settings. Always verify you are in degree mode for angle outputs expressed in degrees.
  • Scale Pythagorean triples for easy construction — multiply 3-4-5 by any factor (e.g. × 4 = 12-16-20) to verify a right angle on-site without a protractor.
Accuracy & limits

Accuracy and limitations

Side lengths are computed to full IEEE 754 double-precision and displayed rounded to the configured decimal places (default: 4). Angles derived from inverse trigonometric functions (arcsin, arccos, arctan) are accurate to approximately 13–14 significant digits. Inputs of zero or negative side lengths are invalid and will produce an error. When the input triangle is very obtuse (nearly 90° at one of the acute angles), the complementary angle approaches 0° and small input errors produce proportionally larger angle errors — standard behaviour of arctangent near 0.

Glossary

Key terms

The longest side of a right triangle; always opposite the 90° angle.
Either of the two shorter sides of a right triangle that form the right angle.
A set of three positive integers (a, b, c) that satisfy a² + b² = c², such as 3-4-5 or 5-12-13.
Mnemonic for the three basic trig ratios: Sin=Opp/Hyp, Cos=Adj/Hyp, Tan=Opp/Adj.
The inverse tangent function; returns the angle whose tangent equals the input. Used to find angles from side ratios.
Two angles that sum to 90°. In a right triangle, the two acute angles are always complementary.
About

About this calculator

Part of our math calculators suite — explore all calculators.

Questions

Frequently asked questions about the free right triangle calculator

A right triangle calculator is a free online tool that helps you solve a right triangle from any two known sides. Pythagorean theorem + trigonometry. It runs entirely in your browser with instant results and no sign-up.
JavaScript double-precision floating-point — accurate to about 15-17 significant digits. For arbitrary precision, use the Big Number calculator.
The statistics calculator computes population variance (divides by n). For sample variance, multiply variance by n/(n-1).

Want a calculator built for your business?

Customize any of our 400+ tools to match your brand, or commission a new one tailored to how your business actually calculates — pricing, payroll, quotes, anything. Deployed on your domain, math runs in your visitors' browsers.