3tej home
← Math

What is Right Triangle Calculator?

A Right Triangle Calculator computes right triangle from the inputs you provide. It applies the standard formula to the values you enter and returns the result instantly, without sending any data to a server. Enter any two sides to find the missing side and all angles.

Right Triangle Calculator

Pythagorean theorem: a² + b² = c². Solves for any missing side or angle.

Solve a right triangle from any two known parts. Returns the missing side, both acute angles, area, and perimeter.

Leg a-
Leg b-
Hypotenuse c-
Angle A (opposite a)-
Angle B (opposite b)-
Area-
Perimeter-
How is this calculated?

Pythagoras: c^2 = a^2 + b^2. Trig: sin(A) = a / c, cos(A) = b / c, tan(A) = a / b. Area = (a x b) / 2. Source: Stewart, Calculus 8e, Appendix D (trigonometry).

About this tool

The Right Triangle Calculator solves any right triangle using the Pythagorean theorem. Enter two sides to find the missing side, all angles (via inverse trig), area, and perimeter.

About the Pythagorean theorem

The Pythagorean theorem is the most cited relationship in elementary geometry. It states that in any right-angled triangle, the square of the hypotenuse equals the sum of the squares of the other two sides. While the theorem is named after the Greek mathematician Pythagoras of Samos (around 570 to 495 BCE), Babylonian clay tablet Plimpton 322 (around 1800 BCE) already lists Pythagorean triples, and the Indian text Baudhayana Sulba Sutra (around 800 BCE) records the equivalent statement and proof. The relationship underpins distance computation, vector magnitude, building construction, navigation, and the entire field of Euclidean trigonometry.

The calculator solves a right triangle from any two known quantities: two legs (SSS), a leg and the hypotenuse (LH), or a leg and the opposite acute angle (LA). It returns the missing side, both acute angles, the area, and the perimeter.

How the formulas work

Pythagoras: c^2 = a^2 + b^2  -> c = sqrt(a^2 + b^2)
Solve leg:  a = sqrt(c^2 - b^2)   (c must be greater than b)
Sine:       sin(A) = opposite / hypotenuse = a / c
Cosine:     cos(A) = adjacent / hypotenuse = b / c
Tangent:    tan(A) = opposite / adjacent  = a / b
Area:       A = (a x b) / 2
Perimeter:  P = a + b + c
Angle sum:  A + B = 90 deg  (the third angle is the 90)
  • Legs: the two sides that meet at the right angle (a and b). Either can be horizontal or vertical depending on orientation.
  • Hypotenuse: the side opposite the right angle. Always the longest side, always c.
  • Acute angles: A is opposite leg a; B is opposite leg b. Both are strictly less than 90 degrees.
  • Right angle: the third angle, always exactly 90 degrees in a right triangle.

Worked example: the 3-4-5 triangle

  1. Inputs: a = 3, b = 4. Both legs known.
  2. Hypotenuse: c = sqrt(3^2 + 4^2) = sqrt(9 + 16) = sqrt(25) = 5.
  3. Angle A: arctan(3 / 4) = 36.87 degrees.
  4. Angle B: arctan(4 / 3) = 53.13 degrees. Check: A + B = 90.
  5. Area: (3 x 4) / 2 = 6 square units.
  6. Perimeter: 3 + 4 + 5 = 12 units.
Insight: the 3-4-5 ratio is the simplest Pythagorean triple and the basis of the carpenter's square. Marking 3 units along one wall and 4 units along the perpendicular, then measuring 5 units between the marks confirms a 90-degree corner without a protractor.

Pythagorean triples reference

abcNotes
345Primitive, smallest, carpenter's triangle
51213Primitive, common in vector problems
81517Primitive, A approximately 28 deg
72425Primitive, very narrow triangle
202129Primitive, near isosceles
6810Scaled 3-4-5 (multiple of 2)
91215Scaled 3-4-5 (multiple of 3)
11sqrt(2)45-45-90 isosceles right triangle
1sqrt(3)230-60-90 special triangle

Common pitfalls

  • Confusing which side is the hypotenuse. The hypotenuse is always opposite the right angle. If you solve for c using a^2 + b^2 = c^2 but a value is actually the hypotenuse, you get a negative under the square root.
  • Applying Pythagoras to a non-right triangle. The theorem requires exactly one 90-degree angle. For a scalene, acute, or obtuse triangle use the law of cosines: c^2 = a^2 + b^2 - 2ab cos(C).
  • Forgetting unit consistency. If a is in metres and b is in centimetres, you cannot square and add them. Convert to a single unit first.
  • Rounding too early. Compute c in full precision, then round only the final answer. Rounding intermediate sqrt values cascades into 2 to 5 percent angle error.
  • Mixing degrees and radians. JavaScript trig functions return radians. The calculator converts to degrees for display. If you copy a 0.785 value thinking it is degrees, it is actually 45 degrees (in radians).
  • Inverse-sine domain error. arcsin only accepts inputs in [-1, 1]. If you pass a / c where a happens to exceed c (because of bad input), the calculator returns NaN; check that the hypotenuse is the largest side.

Related calculators on 3Tej

Solve more geometric problems with these companion tools:

Frequently asked questions

What is the Pythagorean theorem and when does it apply?

In any right-angled triangle, a^2 + b^2 = c^2 where a and b are the two legs that meet at the 90 degree angle and c is the hypotenuse (the side opposite the right angle, always the longest). To find a missing side: c = sqrt(a^2 + b^2), or a = sqrt(c^2 - b^2). The theorem only applies when one angle is exactly 90 degrees. For non-right triangles use the law of cosines: c^2 = a^2 + b^2 - 2ab cos(C).

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

Use the inverse trigonometric functions. Angle A (opposite side a) = arcsin(a / c) = arctan(a / b). Angle B = arcsin(b / c) = arctan(b / a). The third angle is always 90 degrees by definition, so A + B = 90 always. In a 3-4-5 triangle (a=3, b=4, c=5), angle A = arctan(3/4) = 36.87 degrees and angle B = 53.13 degrees.

What is a Pythagorean triple?

A Pythagorean triple is a set of three positive integers (a, b, c) that satisfy a^2 + b^2 = c^2 exactly. The smallest is (3, 4, 5). Other primitive triples include (5, 12, 13), (8, 15, 17), (7, 24, 25), and (20, 21, 29). Every primitive triple can be generated by Euclid's formula a = m^2 - n^2, b = 2mn, c = m^2 + n^2 for coprime m greater than n with one even. Construction trades use these for square framing without a protractor.

How is the area and perimeter of a right triangle calculated?

Area equals one half of the product of the two legs: A = (a x b) / 2. For a 3-4-5 triangle that gives (3 x 4) / 2 = 6 square units. Perimeter is the sum of all three sides: P = a + b + c. The 3-4-5 triangle has perimeter 12. Note that area does not use the hypotenuse directly because the two legs already serve as base and height (they are perpendicular).

Why does the calculator return a degree value rather than radians?

The calculator converts the radian output of JavaScript Math.asin and Math.atan to degrees via the factor 180 / pi, because most school-level and construction-trade users think in degrees. To convert back, multiply degrees by pi / 180. The calculator displays two decimal places for angles, which is roughly 0.01 degree precision (well below the accuracy of typical hand measurement).

Last updated 2026-05-28.

IT
India Tools Editorial
Calculators & explainers maintained by the India Tools team.