AskANumber.com

Triangle Calculator

The defaults form the classic 3-4-5 triangle: legs of 3 and 4 give a hypotenuse of exactly 5, an area of 6, and angles of 36.87° and 53.13°. Enter the two legs of a right triangle and this calculator returns the hypotenuse from the Pythagorean theorem, plus the area, both acute angles, and the perimeter.

Hypotenuse
5
Area
6
Angle A
36.8699
°
Angle B
53.1301
°
Perimeter
12
A 3-4-5 Pythagorean triple
All three sides are whole numbers — like 3-4-5, 5-12-13, and 8-15-17.
Your triangle
Drawn to scale
b = 4a = 3c = 5AB
Inputs
² + ² = c²
A 3-4-5 right triangle
All three sides are whole numbers — a Pythagorean triple. The classic examples are 3-4-5, 5-12-13, and 8-15-17.
This assumes a right angle
The hypotenuse √(a²+b²) and the area a·b/2 only hold when the angle between the two legs is exactly 90°. A non-right triangle needs the laws of sines or cosines.
The acute angles come from the legs
Angle A = atan(a/b), and the other acute angle is 90° − A. All three angles — including the right angle — sum to 180°.
Ask a follow-up
Uses your inputs above
5 hypotenuse. Want to try a variation?

The math

Reviewed 2026
Formula
c = √(a² + b²); area = ab/2

Related calculators

Example: how triangle is calculated

Step-by-step with default inputs

Suppose you put the default values into Triangle Calculator:

Leg a
3
Leg b
4

Plug those into the formula c = √(a² + b²); area = ab/2 and the result is:

Hypotenuse
5

How does the triangle calculator work?

Triangle Calculator uses the formula shown in the math card and is computed from first principles. Inputs are validated for sensible ranges; results are computed client-side for instant feedback and do not leave your browser.

Last reviewed July 2, 2026 · Editorial policy

Frequently asked questions

How do you find the hypotenuse of a right triangle?

Square both legs, add, and take the square root: c = √(a² + b²). With legs 3 and 4, c = √(9 + 16) = √25 = 5. This is the Pythagorean theorem, and it only holds when the angle between the two legs is 90°.

How do you find the angles of a right triangle from two sides?

Use the inverse tangent: the angle opposite leg a is atan(a/b). For legs 3 and 4 that is atan(0.75) ≈ 36.87°, and the other acute angle is its complement, 90° − 36.87° = 53.13°, since all three angles must total 180°.

Does this work for triangles without a right angle?

No — both the Pythagorean theorem and the ab/2 area shortcut assume a 90° angle between the two entered sides. For a general triangle you would need the law of cosines for the third side and the law of sines for the angles.

How accurate is this triangle calculator?

The math is deterministic — the same inputs always produce the same output, and the formula is shown above. Accuracy of the answer for your situation depends on how well your inputs match reality and how well the formula models the question.

How do I share my result?

Hit Share at the top of the page. Every input you change is encoded in the URL, so a permalink reproduces exactly what you see. No account needed.