Skip to content
CalculatorAtlas

Right Triangle Calculator

Tested

Solve a right triangle from its two legs: hypotenuse, angles, area and perimeter.

Tested, not yet published. The formula for this calculator is implemented and passes its automated checks. This page stays non-indexable until it is reviewed and published.

Results

Enter your values and press Calculate. Results appear here.

  • • Result

Quick answer

In a right triangle with legs a and b, the hypotenuse is c = √(a² + b²), the area is ab ÷ 2 and the acute angles are atan(a ÷ b) and atan(b ÷ a). For legs 3 and 4: c = 5, area 6, perimeter 12 and angles 36.87° and 53.13°.

Enter the two legs. The calculator returns the hypotenuse, area, perimeter and both acute angles.

Related tools: Pythagorean Theorem Calculator: Find the hypotenuse or a missing leg of a right triangle. Triangle Calculator: Area, perimeter, angles and type of a triangle from its three sides. Trigonometry Calculator: All six trigonometric functions of an angle.

How to use the Right Triangle Calculator

  1. Enter leg a (above 0).
  2. Enter leg b (above 0).
  3. Press Calculate to see the result, and use Reset to start again.
Inputs of the Right Triangle Calculator
InputWhat to enterAllowed values
Leg aA number> 0
Leg bA number> 0

Formula and method

Formula

c = √(a² + b²); A = ab/2; α = atan(a/b)

IEEE-754 double precision; shown to at most 6 decimal places.

Pythagorean theorem and inverse tangent.

Worked examples

This example is verified: each one is an automated test case that the live calculator must reproduce exactly.

Example 1

Inputs: Leg a = 3; Leg b = 4.

Results of example 1
ResultValue
Hypotenuse c5
Area6
Perimeter12
Angle α (opposite a)36.869898°
Angle β (opposite b)53.130102°

The first line is the headline result (hypotenuse c). Below it the right Triangle Calculator lists area, perimeter, angle α (opposite a) and angle β (opposite b), which describe the same case from other angles. IEEE-754 double precision; shown to at most 6 decimal places.

Special right triangles

A 45-45-90 triangle has sides in the ratio 1 : 1 : √2, and a 30-60-90 triangle has sides 1 : √3 : 2. The 3-4-5 triangle is the smallest whole-number right triangle; multiples such as 6-8-10 keep the same angles.

What this tool takes

It starts from the two legs. If you know the hypotenuse and a leg, use the Pythagorean Theorem calculator, and if you know a side and an angle use the Right Triangle Side and Angle calculator. Legs must be positive.

How the result changes with leg a

Holding every other input at the first worked example, this table changes only leg a. It shows how sensitive the answer is to that one value; each row was produced by running this calculator.

How the result changes with leg a
Leg aHypotenuse cAreaPerimeter
1.54.27200239.772002
35612
67.2111031217.211103
1212.6491112428.649111

What happens with invalid input

These messages are produced by the calculator itself, so you know what to fix.

  • Leg a: entering "-1" shows "Leg a must be greater than 0." beside that field and no result.

Choosing between the Right Triangle Calculator and similar calculators

Each row shows what a related calculator on this site asks for and what it returns, so you can pick the one that matches your question.

Choosing between the Right Triangle Calculator and similar calculators
CalculatorYou enterIt returns
[Pythagorean Theorem Calculator](/math/pythagorean-theorem-calculator/)find, leg a and other sideHypotenuse c
[Triangle Calculator](/math/triangle-calculator/)side a, side b and side cArea
[Trigonometry Calculator](/math/trigonometry-calculator/)angle and unitsin
[Law of Cosines Calculator](/math/law-of-cosines-calculator/)side b, side c and included angle ASide a
[Right Triangle Area Calculator](/math/right-triangle-area/)leg a and leg bArea

Background: geometry measurements

Geometry results carry units that depend on the quantity: a perimeter or length is in linear units such as cm, an area or surface area is in square units (cm²) and a volume is in cubic units (cm³). Use one length unit for every input, because the calculator multiplies the numbers as given.

Flat (2D) shapes have an area and a perimeter; solids (3D) have a surface area and a volume. Two familiar checks: a circle of radius r has area πr² and circumference 2πr, and a sphere has volume (4/3)πr³ and surface area 4πr².

Assumptions and limitations

  • Legs must be positive

If a required value is empty, not a number, or outside its allowed range, the form marks that field with a message and shows no result instead of a misleading number. The automated checks deliberately try invalid entries for leg a to confirm this.

Frequently asked questions

What is the hypotenuse?

The side opposite the right angle and the longest side.

How do I find an acute angle?

atan(opposite ÷ adjacent).

Do the angles always add to 180°?

Yes: the right angle plus the two acute angles make 180°.

What does the Right Triangle Calculator calculate?

Solve a right triangle from its two legs: hypotenuse, angles, area and perimeter. It returns Hypotenuse c, Area, Perimeter, Angle α (opposite a) and Angle β (opposite b).

What formula does the Right Triangle Calculator use?

c = √(a² + b²); A = ab/2; α = atan(a/b). Pythagorean theorem and inverse tangent.

What do I need to enter in the right Triangle Calculator?

You enter Leg a and Leg b.

How is the result rounded or limited?

IEEE-754 double precision; shown to at most 6 decimal places. Legs must be positive.

What is an example of a right Triangle result?

With leg a 3 and leg b 4, the hypotenuse c is 5.

Sources

  • OpenStax, Prealgebra 2e (Rice University): perimeter, area, volume, circumference and the Pythagorean theorem

Content last reviewed 2026-11-04. Formulas and worked examples are checked by automated tests against independently computed values.