Triangle Calculator

A triangle calculator takes the values you know and figures out everything you don't. Feed it two sides and an angle, three sides, or whatever combination you have, and it returns the missing measurements instantly. Whether you're working through a geometry problem, planning a construction project, or just trying to remember how the law of cosines works, having a reliable calculator in your corner saves time and eliminates the arithmetic errors that love to creep in. Below you'll find explanations for every calculation the tool handles, including area, perimeter, missing sides, missing angles, and the special rules that apply to right triangles.

Enter Details

Method

Base

Height

Result

Triangle area

Note — This result is an estimate. Talk to a healthcare provider for personalized guidance.

How to Use the Triangle Calculator

Start by entering whatever values you already know. Most triangle calculators accept several combinations: three sides (SSS), two sides and the included angle (SAS), two angles and one side (AAS or ASA), or two sides and a non-included angle (SSA). You don't need all six measurements to get started.

After entering your known values, hit calculate and the tool fills in the rest automatically. Results typically include all three sides, all three angles, the area, and the perimeter. If a triangle can't be formed from the values you entered, the calculator will tell you that too.

A quick tip: angles are usually entered in degrees, but some calculators let you switch to radians. Double-check that setting before you run the numbers, especially if you're working on something where precision matters.

Solve Any Triangle from Known Values

Every triangle has six measurements: three sides and three angles. You only need three of them (with at least one being a side length) to determine the other three completely. The specific combination you start with determines which formula does the heavy lifting.

Here's a quick breakdown of the common cases:

  • SSS (three sides known): Use the law of cosines to find each angle.
  • SAS (two sides and the angle between them): Law of cosines finds the third side, then law of sines finds the remaining angles.
  • ASA or AAS (two angles and one side): The third angle is easy since all three must add up to 180°. Then use the law of sines for the sides.
  • SSA (two sides and a non-included angle): This is the ambiguous case. There might be one solution, two solutions, or none at all depending on the values.

The calculator handles all of these cases automatically, but knowing which case you're dealing with helps you understand the output and catch any surprises with the SSA scenario.

Triangle Area Calculator

Area is one of the most commonly needed triangle measurements. The right formula depends on what information you're starting with, so there are a few different methods worth knowing about.

Area Using Base and Height

The classic formula is straightforward: multiply the base by the height, then divide by two.

Area = (base × height) / 2

The base can be any side of the triangle. The height is the perpendicular distance from that base to the opposite vertex. That last part trips people up sometimes. The height isn't the same as a side length unless the triangle happens to be a right triangle and you're using the two legs as your base and height.

If you have a triangle sitting on a flat surface and you know how tall it is at its peak, this formula is your fastest path to the area. It works for any triangle regardless of shape.

Area Using Heron’s Formula

When you know all three side lengths but don't have the height, Heron's formula is the way to go. It looks a little intimidating at first glance, but it's straightforward once you break it down.

First, calculate the semi-perimeter: s = (a + b + c) / 2

Then plug that into the main formula: Area = √(s(s−a)(s−b)(s−c))

So if your triangle has sides of 5, 6, and 7, the semi-perimeter is (5+6+7)/2 = 9. The area is then √(9 × 4 × 3 × 2) = √216, which is roughly 14.7 square units.

Heron's formula is especially handy in surveying, construction, and any situation where you've measured the sides of a triangular plot or structure but have no easy way to measure a perpendicular height.

Triangle Perimeter Calculator

The perimeter of a triangle is simply the total distance around it. Add up all three side lengths and you're done.

Perimeter = a + b + c

It really is that simple. If you know all three sides, just sum them. If you're missing one or more sides, you'll need to calculate those first using the law of sines, the law of cosines, or the Pythagorean theorem depending on what information you have available.

Perimeter comes up constantly in practical situations: fencing a triangular yard, framing a triangular window, calculating the trim around a triangular architectural feature. The calculator handles the side-finding step automatically so you get the perimeter even when you start with angles.

Find Missing Sides and Angles

Two formulas cover the vast majority of triangle-solving situations: the law of sines and the law of cosines. Each one is better suited to certain combinations of known values, and the calculator applies whichever is appropriate based on your input.

Law of Sines

The law of sines relates each side of a triangle to the sine of its opposite angle. Written out, it looks like this:

a / sin(A) = b / sin(B) = c / sin(C)

This is the go-to formula when you have two angles and any side (AAS or ASA), or when you have two sides and an angle that isn't between them (SSA). It's relatively quick to apply because you're setting up simple proportions and solving for the unknown.

The one thing to watch for is the ambiguous SSA case mentioned earlier. When you're given two sides and a non-included angle, there are situations where two different triangles satisfy the same conditions. A good calculator flags this and shows both possible solutions.

Law of Cosines

The law of cosines is a generalization of the Pythagorean theorem. It works for any triangle, not just right triangles, and it's the right tool when you know three sides (SSS) or two sides plus the included angle (SAS).

The formula: c² = a² + b² − 2ab × cos(C)

You can rearrange it to solve for any of the three sides or rearrange to find an angle: cos(C) = (a² + b² − c²) / (2ab)

Notice that when angle C is 90°, cos(C) equals zero and the formula reduces to c² = a² + b², which is exactly the Pythagorean theorem. That connection makes the law of cosines feel a lot less abstract once you see it.

Right Triangle Calculations

Right triangles get their own section because they're everywhere. Architecture, engineering, navigation, carpentry, and countless other fields rely on them constantly. They also have some calculation shortcuts that make them faster to solve than general triangles.

In a right triangle, one angle is always 90°. The side opposite that right angle is the hypotenuse, which is always the longest side. The other two sides are called the legs. Once you know two of the three side lengths, or one side and one acute angle, you can find everything else.

Pythagorean Theorem

This is probably the most famous formula in geometry: a² + b² = c²

Here, a and b are the two legs and c is the hypotenuse. Know any two sides and you can find the third. Need the hypotenuse? Take the square root of the sum of the squared legs. Need a missing leg? Subtract the squared known leg from the squared hypotenuse and take the square root.

Common right triangle combinations worth memorizing are the 3-4-5 and 5-12-13 Pythagorean triples. These are sets of whole numbers that satisfy the theorem perfectly, and they show up often in construction and standardized tests.

For angles in a right triangle, you'd use inverse trig functions. If you know both legs, arctan(opposite/adjacent) gives you the angle. The calculator handles all of this automatically, but it's good to understand what's happening under the hood.

Types of Triangles

Triangles get classified two different ways: by their side lengths and by their angles. Both classification systems are useful, and a triangle can fit into one category from each system at the same time (like a right isosceles triangle).

Equilateral, Isosceles, and Scalene Triangles

These categories are based on how many sides are equal in length.

  • Equilateral: All three sides are the same length. As a result, all three angles are also equal at exactly 60° each. These triangles have perfect symmetry in every direction.
  • Isosceles: Two sides are equal. The two angles opposite those equal sides are also equal. This is the triangle shape you see in a lot of roof gables and warning signs.
  • Scalene: All three sides have different lengths, which means all three angles are different too. Most triangles you encounter in real-world problems are scalene.

Knowing which type you're dealing with can sometimes simplify your calculations significantly. An equilateral triangle, for example, only requires one measurement to fully define it.

Acute, Right, and Obtuse Triangles

This classification is all about the angles.

  • Acute: Every angle is less than 90°. The triangle looks "sharp" in a general sense, though the term applies to the angles rather than any visual impression.
  • Right: Exactly one angle equals 90°. The Pythagorean theorem and trig ratios apply directly, making calculations relatively clean.
  • Obtuse: One angle is greater than 90°. Only one angle can be obtuse since the three angles must sum to 180°.

You can figure out which type a triangle is by checking its angles, but you can also test using side lengths. If c² < a² + b², the triangle is acute. If c² = a² + b², it's a right triangle. If c² > a² + b², it's obtuse. That relationship comes straight from the law of cosines.

Triangle Calculation Formulas

Here's a consolidated reference for the core formulas used in triangle calculations.

FormulaWhat It CalculatesWhen to Use It
Area = (base × height) / 2AreaWhen base and perpendicular height are known
Area = √(s(s−a)(s−b)(s−c))Area (Heron's)When all three sides are known
Perimeter = a + b + cPerimeterWhen all three sides are known
a² + b² = c²Side of right triangleRight triangles only
a / sin(A) = b / sin(B) = c / sin(C)Missing side or angleAAS, ASA, SSA cases
c² = a² + b² − 2ab·cos(C)Missing side or angleSSS and SAS cases

These six formulas cover nearly every standard triangle problem. For specialized cases like finding the inradius or circumradius, there are additional formulas described in the section below.

Triangle Calculation Examples

Working through a few concrete examples is the fastest way to see how these formulas actually behave.

Example 1: Find the area of a triangle with base 10 and height 6.
Area = (10 × 6) / 2 = 30 square units. Simple.

Example 2: Find the missing side of a right triangle with legs 8 and 15.
c² = 8² + 15² = 64 + 225 = 289, so c = 17. This is a scaled version of the 8-15-17 Pythagorean triple.

Example 3: Find the area of a triangle with sides 9, 12, and 15.
Semi-perimeter: s = (9+12+15)/2 = 18. Area = √(18 × 9 × 6 × 3) = √2916 = 54 square units. (As a check: this is a 3-4-5 triple scaled by 3, so it's a right triangle and area = (9 × 12)/2 = 54. Confirmed.)

Example 4: Find an angle using the law of cosines. Sides are a=7, b=10, c=5.
cos(C) = (7² + 10² − 5²) / (2 × 7 × 10) = (49 + 100 − 25) / 140 = 124/140 ≈ 0.886. Angle C ≈ arccos(0.886) ≈ 27.7°.

Median, Inradius, and Circumradius

Beyond the basics, there are a few more measurements that come up regularly, especially in advanced geometry and engineering contexts.

Median: A median connects a vertex to the midpoint of the opposite side. Every triangle has three medians, and they all intersect at a single point called the centroid. The length of the median from vertex A to side a can be calculated as:

m_a = (1/2) × √(2b² + 2c² − a²)

Inradius: The inradius is the radius of the largest circle that fits inside the triangle, touching all three sides. The formula is:

r = Area / s where s is the semi-perimeter.

A larger inradius means a "rounder" or more balanced triangle. An equilateral triangle has the largest inradius relative to its side length of any triangle type.

Circumradius: The circumradius is the radius of the circle that passes through all three vertices of the triangle. The formula is:

R = (a × b × c) / (4 × Area)

The circumradius is useful in geometry proofs and also in some engineering applications where you need to fit a triangle inside a circle or figure out arc lengths between vertices.

Common Applications of Triangle Calculations

Triangles aren't just a classroom topic. They show up in an impressive range of real-world situations.

  • Construction and carpentry: Roof pitch, rafter length, and stair stringers all involve right triangle calculations. The 3-4-5 method is a classic trick for squaring corners on a job site.
  • Surveying and land measurement: Surveyors triangulate positions and calculate the area of irregularly shaped plots by breaking them into triangles.
  • Navigation: Pilots and sailors use triangle geometry to calculate distances, headings, and positions, especially when accounting for wind or current.
  • Engineering and physics: Force vectors are often resolved into components using triangle relationships. Structural analysis of trusses depends heavily on triangle geometry because triangles are the most rigid polygon.
  • Computer graphics and gaming: Every 3D model is built from triangles. Rendering engines calculate lighting, shadows, and intersections using the same formulas covered here.
  • Astronomy: Parallax measurements use triangulation to calculate distances to nearby stars, with Earth's orbit forming the base of the triangle.

The math might feel abstract at first, but triangles are one of those areas where the theory and the practical application stay closely connected. Once you get comfortable with these calculations, you'll start noticing triangles everywhere.

Other Maths Calculators

Explore all