Right Triangle Calculator

Solve right triangles using the Pythagorean theorem and trigonometry. Calculate all sides, angles, area, and perimeter.

Select Input Method

Triangle Inputs

Enter the length of side a (one of the legs)
Enter the length of side b (the other leg)
Enter the length of the hypotenuse (longest side)
Note: Enter any 2 of the 3 sides above. Leave one blank to calculate it.
Select the unit for all measurements

Results

Special Right Triangles

45-45-90 Triangle

  • Angles: 45°, 45°, 90°
  • Side Ratios: 1 : 1 : √2
  • Properties: Isosceles right triangle
  • If legs = 1: hypotenuse = √2 ≈ 1.414
  • Example: 5, 5, 7.071

30-60-90 Triangle

  • Angles: 30°, 60°, 90°
  • Side Ratios: 1 : √3 : 2
  • Properties: Half of equilateral triangle
  • If short leg = 1: long leg = √3 ≈ 1.732, hypotenuse = 2
  • Example: 3, 5.196, 6

Understanding Right Triangles

A right triangle is one of the most fundamental and important shapes in geometry and mathematics. It's a triangle that contains one angle of exactly 90 degrees (a right angle), which creates unique mathematical relationships between its sides and angles. These relationships, primarily expressed through the Pythagorean theorem and trigonometric ratios, form the foundation for countless applications in mathematics, engineering, architecture, navigation, physics, and many other fields. Our comprehensive right triangle calculator helps you solve for all unknown values given just two pieces of information about the triangle.

What Makes a Right Triangle Special

A right triangle has three sides with specific names: the two sides that form the right angle are called "legs" (often labeled as 'a' and 'b'), and the longest side opposite the right angle is called the "hypotenuse" (labeled 'c'). The hypotenuse is always the longest side in a right triangle. The three angles in a right triangle must sum to 180 degrees, with one angle being exactly 90 degrees and the other two angles being acute (less than 90 degrees) and complementary (summing to 90 degrees). This special configuration creates predictable mathematical relationships that have been studied and utilized for thousands of years.

The Pythagorean Theorem: The Cornerstone Formula

The Pythagorean theorem is perhaps the most famous theorem in all of mathematics, discovered by the ancient Greek mathematician Pythagoras around 500 BCE. This elegant formula states that in a right triangle, the square of the hypotenuse (the longest side) equals the sum of the squares of the other two sides. Expressed mathematically: a² + b² = c², where 'c' is the hypotenuse and 'a' and 'b' are the legs.

This theorem has numerous practical applications. If you know any two sides of a right triangle, you can calculate the third side:

Finding the hypotenuse: c = √(a² + b²)
Finding a leg: a = √(c² - b²) or b = √(c² - a²)

For example, if a right triangle has legs of length 3 and 4, the hypotenuse would be: c = √(3² + 4²) = √(9 + 16) = √25 = 5. This particular triangle (3-4-5) is one of the most famous Pythagorean triples—sets of three integers that satisfy the Pythagorean theorem perfectly.

Trigonometric Ratios: Sine, Cosine, and Tangent

Trigonometry extends our understanding of right triangles by establishing relationships between angles and side lengths. The three primary trigonometric ratios—sine, cosine, and tangent—are defined using the sides of a right triangle relative to a specific angle. These ratios remain constant for any given angle, regardless of the triangle's size, making them incredibly useful for solving problems involving angles and distances.

For an angle θ (theta) in a right triangle, the trigonometric ratios are defined as:

Sine (sin): sin(θ) = opposite / hypotenuse
Cosine (cos): cos(θ) = adjacent / hypotenuse
Tangent (tan): tan(θ) = opposite / adjacent

A helpful mnemonic for remembering these ratios is SOH-CAH-TOA: Sine = Opposite/Hypotenuse, Cosine = Adjacent/Hypotenuse, Tangent = Opposite/Adjacent. These ratios allow us to find unknown sides when we know one side and one angle, or to find unknown angles when we know two sides.

Solving Right Triangles: Multiple Methods

Our calculator can solve right triangles using various combinations of known values:

Method 1: Two Sides Known

When you know any two sides of a right triangle, you can find the third side using the Pythagorean theorem. Once all three sides are known, you can calculate the angles using inverse trigonometric functions (arcsin, arccos, or arctan). For example, if you know sides a and b, you can find angle A using: A = arctan(a/b).

Method 2: One Side and One Angle Known

When you know one side and one acute angle (in addition to the right angle), you can use trigonometric ratios to find the other sides. For instance, if you know side a and angle A, you can find the hypotenuse using: c = a / sin(A), and find side b using: b = a / tan(A). Then angle B = 90° - A.

Method 3: Hypotenuse and One Angle Known

If you know the hypotenuse and one acute angle, you can find both legs using sine and cosine. For example, if you know hypotenuse c and angle A: side a = c × sin(A) and side b = c × cos(A). This method is particularly useful in navigation and surveying.

Special Right Triangles: 30-60-90 and 45-45-90

Two special right triangles deserve particular attention because their angle measurements create predictable side length ratios that frequently appear in mathematics and real-world applications.

The 45-45-90 Triangle

This isosceles right triangle has two 45-degree angles and one 90-degree angle. The two legs are equal in length, and the hypotenuse is exactly √2 (approximately 1.414) times the length of each leg. The side ratio is 1 : 1 : √2. This triangle appears when you cut a square diagonally in half. For example, if each leg is 5 units, the hypotenuse is 5√2 ≈ 7.071 units. This triangle is fundamental in understanding square roots and appears frequently in geometry proofs and constructions.

The 30-60-90 Triangle

This triangle has angles of 30 degrees, 60 degrees, and 90 degrees, with side ratios of 1 : √3 : 2. If the shortest side (opposite the 30° angle) has length 1, the longer leg (opposite the 60° angle) has length √3 (approximately 1.732), and the hypotenuse has length 2. This triangle is exactly half of an equilateral triangle. For example, if the short leg is 3 units, the long leg is 3√3 ≈ 5.196 units, and the hypotenuse is 6 units. This triangle is essential in understanding trigonometric values for 30° and 60° angles.

Calculating Area, Perimeter, and Altitude

Beyond sides and angles, several other properties of right triangles are important in practical applications:

Area

The area of a right triangle is exceptionally simple to calculate because the two legs are perpendicular to each other, forming a natural base and height. The formula is: Area = (1/2) × a × b, where a and b are the lengths of the two legs. This is the same as the general triangle area formula (Area = 1/2 × base × height), but in a right triangle, the legs serve as the base and height.

Perimeter

The perimeter is simply the sum of all three sides: Perimeter = a + b + c. For the famous 3-4-5 triangle, the perimeter is 3 + 4 + 5 = 12 units.

Altitude to the Hypotenuse

The altitude (or height) drawn from the right angle to the hypotenuse creates interesting geometric relationships. This altitude can be calculated using the formula: h = (a × b) / c. Interestingly, this altitude divides the original triangle into two smaller triangles that are similar to each other and to the original triangle. This property has important applications in geometry and scaling problems.

Pythagorean Triples: Perfect Integer Solutions

A Pythagorean triple is a set of three positive integers a, b, and c that satisfy the Pythagorean theorem equation a² + b² = c². These special combinations create right triangles with integer side lengths, making them particularly useful for construction, carpentry, and educational purposes. The most famous Pythagorean triple is 3-4-5, which has been used since ancient times to create perfect right angles.

Common Pythagorean triples include:

  • 3-4-5: The smallest and most well-known primitive triple (3² + 4² = 9 + 16 = 25 = 5²)
  • 5-12-13: Another primitive triple (5² + 12² = 25 + 144 = 169 = 13²)
  • 8-15-17: (8² + 15² = 64 + 225 = 289 = 17²)
  • 7-24-25: (7² + 24² = 49 + 576 = 625 = 25²)

Additionally, any multiple of a Pythagorean triple is also a Pythagorean triple. For example, doubling the 3-4-5 triple gives 6-8-10, and tripling it gives 9-12-15. Carpenters and builders often use these triples to ensure corners are square: by measuring 3 feet on one wall, 4 feet on another wall, and ensuring the diagonal between these points is exactly 5 feet, they can verify a perfect 90-degree angle.

Real-World Applications of Right Triangles

Construction and Architecture

Right triangles are essential in construction for ensuring structures are level, plumb, and square. The 3-4-5 method is used to create perfect right angles when laying foundations or framing walls. Roof pitch calculations use right triangle relationships to determine rafter lengths and angles. Staircase design relies on right triangle principles to calculate tread depth and riser height for safe, comfortable stairs. Architects use right triangles to calculate optimal window placement for natural lighting and to design structurally sound buildings.

Navigation and Surveying

Navigation extensively uses right triangle trigonometry to calculate distances and bearings. When a ship or aircraft changes direction, the resulting position can be found by solving a right triangle. Surveyors use theodolites and total stations to measure angles and distances, then apply right triangle calculations to determine heights of buildings, depths of valleys, and distances across obstacles like rivers. GPS technology fundamentally relies on triangulation principles derived from right triangle relationships.

Physics and Engineering

In physics, right triangles help resolve vectors into components. Force vectors, velocity vectors, and other physical quantities are broken down into perpendicular components using trigonometric ratios, making complex problems much simpler to solve. Engineering disciplines use right triangles to calculate stresses, forces, angles, and dimensions in everything from bridge design to aerospace engineering. Inclined plane problems, projectile motion, and many other physics concepts rely heavily on right triangle calculations.

Computer Graphics and Game Development

Computer graphics use right triangle calculations constantly. Distance calculations between points in 2D or 3D space use the Pythagorean theorem. Rotation and scaling transformations rely on trigonometric functions. Ray tracing, lighting calculations, and collision detection all involve right triangle mathematics. Game developers use these principles to create realistic movement, accurate physics simulations, and believable 3D environments.

Astronomy and Space Exploration

Astronomers use right triangle principles to calculate distances to celestial objects using parallax. By measuring the apparent shift in a star's position from two different points in Earth's orbit (separated by six months), they can solve a right triangle to determine the star's distance. Space missions use right triangle calculations for trajectory planning, orbital mechanics, and landing approach angles.

Advanced Concepts and Extensions

The Unit Circle and Trigonometric Functions

The concept of right triangles extends to the unit circle in advanced mathematics. A unit circle (radius = 1) centered at the origin creates right triangles where the hypotenuse is always 1, making the trigonometric ratios particularly simple to visualize. This connection between right triangles and the unit circle is fundamental to understanding periodic functions, wave motion, and advanced calculus.

Three-Dimensional Applications

Right triangles extend into three dimensions through multiple applications. The distance between two points in 3D space uses a three-dimensional version of the Pythagorean theorem: d = √[(x₂-x₁)² + (y₂-y₁)² + (z₂-z₁)²]. Diagonal lengths through rectangular solids, angles between planes, and many other 3D problems rely on right triangle principles applied in creative ways.

Tips for Using the Right Triangle Calculator

  • Choose the right input method: Select whether you're providing two sides, one side plus one angle, or the hypotenuse plus an angle
  • Check your inputs: Ensure the hypotenuse (if provided) is longer than any leg, and angles are between 0° and 90°
  • Understand the results: Review not just the final answers but also the solving method and calculation steps to learn the underlying mathematics
  • Use appropriate units: Select the measurement unit that matches your problem (centimeters, meters, feet, etc.)
  • Verify with the Pythagorean theorem: After calculation, verify that a² + b² = c² to ensure accuracy
  • Consider special triangles: If your angles are 45° or 30°/60°, you're working with special triangles that have elegant side ratios
  • Look for Pythagorean triples: If your calculated sides are close to integers, you may be working with a Pythagorean triple

Common Mistakes to Avoid

  • Confusing which side is the hypotenuse—it's always opposite the 90° angle and is always the longest side
  • Forgetting to ensure your calculator is in degree mode (not radian mode) when working with degree measurements
  • Attempting to use the Pythagorean theorem on non-right triangles—it only applies to right triangles
  • Mixing up opposite and adjacent sides when applying trigonometric ratios—always identify them relative to the angle you're working with
  • Providing impossible measurements, such as a hypotenuse shorter than one of the legs
  • Rounding intermediate calculations too early, which can lead to accumulating errors in final results

Why Use Our Right Triangle Calculator?

While the mathematics behind right triangles is well-understood, calculations can be time-consuming and error-prone, especially when working with trigonometric functions, angle conversions, and multiple related values. Our comprehensive calculator eliminates these concerns by providing instant, accurate results for all triangle properties simultaneously. Whether you're a student learning geometry, an engineer working on a design project, a carpenter framing a structure, or anyone who needs to work with right triangles, this calculator streamlines your work and ensures accuracy.

The calculator provides not just answers but understanding: it shows you which solving method was used, displays all calculation steps, visualizes the triangle, and even identifies special triangles and Pythagorean triples when applicable. This educational approach helps you learn the underlying principles while getting the practical results you need. The visual representation helps build geometric intuition, while the detailed steps serve as a learning tool or verification method for manual calculations.