Right Triangle Calculator

Solve a right triangle from two known values: all sides, both acute angles, area, perimeter and height to the hypotenuse.

Enter details

Sides a, b, c

3, 4, 5

Angles A, B
36.8699°, 53.1301°
Area
6
Perimeter
12
Height to hypotenuse
2.4

How sides a, b, c changes with

First value (a or c): 1.5 → 1.5, 4, 4.2724.5 → 4.5, 4, 6.0208

The dot is your current value. The graph updates as you type.

Formula: a² + b² = c²; sin A = a/c, cos A = b/c, tan A = a/b

Right Triangle Calculator: Solve Sides & Angles

Short answer

The Right Triangle Calculator solves all missing dimensions of a 90-degree triangle from any two known parameters, including sides, angles, area, and altitude. For example, entering leg a = 3 and leg b = 4 calculates hypotenuse c = 5, acute angles A ≈ 36.8699° and B ≈ 53.1301°, area = 6, perimeter = 12, and height to the hypotenuse = 2.4.

Formula

a² + b² = c²; sin A = a/c, cos A = b/c, tan A = a/b

Right triangle calculations rely on the Pythagorean theorem and fundamental trigonometry. In the formula a² + b² = c², 'a' and 'b' are the mutually perpendicular legs, and 'c' is the hypotenuse opposite the 90-degree right angle. For acute angles A and B, the primary trigonometric ratios define their relationships: sin A = a/c, cos A = b/c, and tan A = a/b. Complementary angles satisfy A + B = 90°. The triangle's total surface space is given by Area = (a · b) / 2, while total boundary length is Perimeter = a + b + c. The perpendicular altitude from the right angle to the hypotenuse is computed as height h = (a · b) / c.

Worked example

Known values
ab
First value (a or c)
3
Second value (b, c or angle A in °)
4
  • Sides a, b, c: 3, 4, 5
  • Angles A, B: 36.8699°, 53.1301°
  • Area: 6
  • Perimeter: 12
  • Height to hypotenuse: 2.4

How the Right Triangle Calculator Works

A right triangle (or right-angled triangle) is a three-sided planar polygon defined by one internal angle measuring exactly $90^\circ$, commonly referred to as the right angle. In Euclidean geometry, the properties of right triangles serve as the cornerstone of trigonometry, analytic geometry, and structural engineering. The two sides that intersect to form the $90^\circ$ angle are designated as the legs ($a$ and $b$), while the third and longest side, situated directly opposite the right angle, is the hypotenuse ($c$).

The Right Triangle Calculator solves for every geometric dimension of the triangle when provided with just two independent known values. Depending on the scenario, you can input:

  1. Two legs ($a$ and $b$): The base and vertical height of the right angle.
  2. One leg and the hypotenuse ($a$ and $c$): A perpendicular side and the opposing long side.
  3. One leg and its opposite angle ($a$ and $A$): A linear side and the angle facing it.
  4. The hypotenuse and an acute angle ($c$ and $A$): The diagonal length and one acute inclination.

The Mathematical Foundations

The calculator combines three primary mathematical principles to resolve unknown values:

1. The Pythagorean Theorem

Formulated for all right-angled triangles in a flat plane, this theorem states that the square of the hypotenuse equals the sum of the squares of the other two sides: $$a^2 + b^2 = c^2$$ When both legs are known, the hypotenuse is determined via: $$c = \sqrt{a^2 + b^2}$$ Conversely, if the hypotenuse $c$ and one leg $a$ are known, the missing leg $b$ is computed as: $$b = \sqrt{c^2 - a^2}$$

2. Trigonometric Ratios

The acute angles of the triangle, denoted as $A$ (opposite leg $a$) and $B$ (opposite leg $b$), are governed by direct trigonometric relationships: $$\sin A = \frac{\text{Opposite}}{\text{Hypotenuse}} = \frac{a}{c}$$ $$\cos A = \frac{\text{Adjacent}}{\text{Hypotenuse}} = \frac{b}{c}$$ $$\tan A = \frac{\text{Opposite}}{\text{Adjacent}} = \frac{a}{b}$$ Because the sum of all interior angles in any Euclidean triangle equals $180^\circ$, and one angle is fixed at $90^\circ$, the two acute angles are complementary: $$A + B = 90^\circ \implies B = 90^\circ - A$$

3. Derived Geometric Metrics

Once all sides and angles are resolved, the tool computes three critical secondary metrics:

  • Area: Because the two legs are mutually perpendicular, each serves as the altitude for the other: $$\text{Area} = \frac{a \cdot b}{2}$$
  • Perimeter: The total linear distance around the perimeter: $$\text{Perimeter} = a + b + c$$
  • Height to Hypotenuse ($h$): The perpendicular line segment extending from the right-angled vertex to the hypotenuse. By equating area representations—$\frac{a \cdot b}{2} = \frac{c \cdot h}{2}$—the altitude simplifies to: $$h = \frac{a \cdot b}{c}$$

Step-by-Step Worked Example

To observe the calculation process in detail, consider the standard configuration where the lengths of both perpendicular legs are known.

Selected Input Parameters

  • Known values option ($k$): Leg $a$ and leg $b$ (ab)
  • First value ($x$): $3$
  • Second value ($y$): $4$

Step 1: Calculate Hypotenuse $c$

Using the Pythagorean theorem: $$c = \sqrt{a^2 + b^2}$$ $$c = \sqrt{3^2 + 4^2} = \sqrt{9 + 16} = \sqrt{25} = 5$$

Step 2: Calculate Acute Angle $A$

Using the tangent function for angle $A$ (opposite leg $a$): $$\tan A = \frac{a}{b} = \frac{3}{4} = 0.75$$ $$A = \arctan(0.75) \approx 36.86989765^\circ$$ Rounding to four decimal places gives: $$A = 36.8699^\circ$$

Step 3: Calculate Acute Angle $B$

Because angles $A$ and $B$ are complementary: $$B = 90^\circ - A$$ $$B = 90^\circ - 36.86989765^\circ \approx 53.13010235^\circ$$ Rounding to four decimal places yields: $$B = 53.1301^\circ$$

Step 4: Calculate the Area

Using the formula for the area of a right triangle: $$\text{Area} = \frac{a \cdot b}{2} = \frac{3 \cdot 4}{2} = \frac{12}{2} = 6$$

Step 5: Calculate the Perimeter

Summing all three exterior side lengths: $$\text{Perimeter} = a + b + c = 3 + 4 + 5 = 12$$

Step 6: Calculate the Height to Hypotenuse ($h$)

Using the relationship between area and hypotenuse: $$h = \frac{a \cdot b}{c} = \frac{3 \cdot 4}{5} = \frac{12}{5} = 2.4$$

Summary of Results

  • Sides a, b, c: $3, 4, 5$
  • Angles A, B: $36.8699^\circ, 53.1301^\circ$
  • Area: $6$
  • Perimeter: $12$
  • Height to hypotenuse: $2.4$

How to Interpret Your Results

Interpreting the output of the Right Triangle Calculator requires an understanding of how each metric relates to spatial planning and physical layouts.

Sides ($a, b, c$)

The sides reflect the linear extents of your boundary. The hypotenuse ($c$) must always be strictly larger than leg $a$ or leg $b$, but strictly less than their sum ($a + b$), fulfilling the triangle inequality theorem. In real-world fabrication, if you are building stairs, rafters, or structural brackets, leg $a$ represents the rise, leg $b$ represents the run, and hypotenuse $c$ represents the diagonal stringer or rake.

Acute Angles ($A, B$)

The angles represent the pitch, slope, or incline of the diagonal. In architectural and drafting conventions, angle $A$ represents the angle of elevation from the horizontal base ($b$) up along the diagonal ($c$), while angle $B$ represents the plumb cut or pitch relative to the vertical line ($a$). Always verify that $A + B = 90.0000^\circ$. A minor discrepancy in high-decimal calculations typically indicates rounding differences, but the analytical sum is fixed.

Surface Area and Perimeter

  • Area: Expressed in square units (such as square inches, square feet, or square meters). This metric indicates the amount of material required to cover the triangular surface, such as drywall, plywood sheathing on a gable end, or concrete formwork.
  • Perimeter: Expressed in linear units. This value provides the exact length needed for continuous trim, perimeter flashing, structural framing members, or edging.

Height to Hypotenuse ($h$)

The altitude is particularly informative in structural design and geometric decomposition. Dropping this perpendicular line divides the original triangle into two smaller, right-angled sub-triangles. Crucially, both of these sub-triangles are geometrically similar to each other and to the parent triangle. This measurement is widely used when designing roof trusses (such as king-post or queen-post trusses) where internal vertical braces must meet a rafter at a strict $90^\circ$ angle.


Practical Tips

Applying right triangle geometry to real-world tasks involves physical constraints that pure equations do not account for. Keep these technical recommendations in mind:

1. Maintain Unit Consistency

Always convert all measurements to a common unit before entering them into the tool. Entering a rise of $18$ inches and a run of $2$ feet without converting the run to $24$ inches will generate an incorrect triangle. If working with imperial fractions (e.g., $5\frac{3}{8}$ inches), convert the fraction to decimal format ($5.375$ inches) prior to entry.

2. Verify Field Squareness with the 3-4-5 Method

In carpentry and site excavation, tradespeople frequently use the $(3, 4, 5)$ Pythagorean triple to verify right angles. To square a deck framing corner or foundation line, measure $3$ feet along one ledger, $4$ feet along the perpendicular rim joist, and check the diagonal span between the marks. If the diagonal measures exactly $5$ feet, the corner is confirmed at $90^\circ$.

3. Consider Safety Standards for Incline

When using right triangle calculations for ladder positioning, ramp design, or stair layouts, check regulatory standards. For instance, the Occupational Safety and Health Administration (OSHA) mandates a $4:1$ ratio for non-self-supporting extension ladders—for every $4$ feet of vertical rise ($a$), the base ($b$) should be placed $1$ foot away from the wall. This corresponds to an acute angle of approximately $75.96^\circ$: $$\tan A = \frac{4}{1} = 4 \implies A = \arctan(4) \approx 75.96^\circ$$

4. Watch for Cumulative Decimal Rounding

When transferring digital results to layout tools, avoid rounding intermediate figures. If an angle is computed as $36.8699^\circ$, rounding to $37^\circ$ across a 50-foot commercial steel truss can translate into a lateral error of several inches at the ridge. Use full-precision numbers until the final cut list or layout mark is made.

Comparison

ScenarioInputResult
Base exampleDefault inputsSides a, b, c: 3, 4, 5

Common mistakes

  • Confusing a perpendicular leg (a or b) with the hypotenuse (c), which must always be the longest side.
  • Entering angular measurements in radians or attempting to input an acute angle equal to or exceeding 90 degrees.
  • Assuming the height to the hypotenuse is merely one of the perpendicular legs instead of calculating the altitude h = (a · b) / c.
  • Attempting to solve an impossible triangle where the hypotenuse is specified as smaller than or equal to a given leg (c <= a).
  • Rounding intermediate trigonometric ratios prematurely, causing cascading inaccuracies in the final angles, perimeter, and area.

Checklist

  • Identify which two distinct values are already known (e.g., two legs, leg and hypotenuse, or a side and an acute angle).
  • Confirm that the geometric figure contains a true 90-degree right angle.
  • Standardize all input dimensions into identical linear measurement units before calculation.
  • Verify that any specified acute angle is strictly between 0 and 90 degrees.
  • Ensure that any entered hypotenuse strictly exceeds the length of the provided leg.
  • Record all primary outputs, including sides, complementary angles, area, perimeter, and altitude to hypotenuse.
Michael Torres

Michael Torres

Co-Founder & Chief Editor

Michael Torres writes about personal finance, loans, and savings for the financial blog The Money Leads.

More about MichaelRead on The Money LeadsLast reviewed:

This calculator provides geometric evaluations based on standard Euclidean mathematical principles for design, educational, and preliminary planning purposes. Always consult a licensed structural engineer, surveyor, or local building code official when determining critical load-bearing dimensions, structural framing, or property boundaries.

Frequently Asked Questions

Can I solve a right triangle if I only know one side length?

Yes, provided you also know one of the two acute angles. Knowing one side and one acute angle allows the calculator to find the complementary angle by subtracting from 90 degrees. From there, standard trigonometric ratios (sine, cosine, and tangent) unlock the remaining two sides. However, if you only possess one side length and no angle measurements other than the 90-degree angle, an infinite number of non-congruent right triangles can be formed, making a unique solution impossible.

Why must the hypotenuse always be longer than either leg?

In Euclidean geometry, the largest side of any triangle is always situated directly opposite its largest internal angle. In a right triangle, the right angle measures exactly 90 degrees. Because the sum of all interior angles in a planar triangle must equal 180 degrees, the remaining two acute angles must sum to 90 degrees, meaning neither can reach or exceed 90 degrees. Therefore, the hypotenuse, which opposes the 90-degree angle, is mathematically guaranteed to be the longest side.

How is the height to the hypotenuse derived?

The height to the hypotenuse, also called the altitude, represents the perpendicular distance from the right-angled vertex to the hypotenuse side. It is derived by equating two different methods of calculating triangle area: Area = (a · b) / 2 and Area = (c · h) / 2. Setting these two expressions equal to each other gives (a · b) / 2 = (c · h) / 2. Multiplying both sides by 2 and dividing by hypotenuse c isolates the altitude as h = (a · b) / c.

What happens if I enter an acute angle of 90 degrees or greater?

Entering an angle of 90 degrees or higher produces an invalid geometric condition. A triangle's three interior angles must sum to exactly 180 degrees. Since a right triangle already includes one mandatory 90-degree angle, the remaining two acute angles must share the remaining 90 degrees. If one acute angle were 90 degrees or more, the third angle would have to be zero or negative, which cannot form a closed, three-sided planar polygon.

What is a Pythagorean triple and why is it useful?

A Pythagorean triple consists of three positive integers (a, b, c) that perfectly satisfy the equation a² + b² = c². Well-known primitive examples include (3, 4, 5), (5, 12, 13), and (8, 15, 17), alongside their integer multiples like (6, 8, 10). Builders, carpenters, and surveyors frequently rely on the 3-4-5 ratio on job sites to establish or verify perfectly square 90-degree corners without needing dedicated digital angle finders.

Do changes in linear measurement units alter the computed angles?

No. Angular values in right triangles depend entirely on the dimensionless ratios between side lengths, not on the physical scale or units of measurement. Whether your triangle has legs measuring 3 inches and 4 inches or 3 meters and 4 meters, the tangent ratio tan A = a/b remains 0.75. Taking the inverse tangent of 0.75 will yield approximately 36.8699 degrees in both cases, preserving identical geometric shape and angular proportions.

Sources & references

Formulas are tested against hand-checked answers. How we check our calculators.

Estimates only. Confirm final figures, terms and fees with your bank, provider or a qualified professional.

Last updated: January 15, 2026