Triangle Calculator

By Harmain Manzoor · Reviewed by Fahad Ullah

MathGeometry·Last updated August 10, 2026

A triangle calculator solves for every side, angle, and derived measurement of a triangle once you give it three known values, as long as at least one of those values is a side length. Enter what you already have, whether that is three sides, two sides and an angle, or two angles and a side, and the calculator works out everything else: the missing sides, the missing angles, the area, the perimeter, the height, and more. It also draws a diagram of your triangle so you can check the shape against what you expected.

What Is a Triangle Calculator?

A Triangle Calculator is an automated tool that computes the missing sides, angles, area, and perimeter of any triangle based on limited input.

  • Core Requirement: Requires any 3 known values, provided at least 1 is a side length (angles alone define shape, not size).

  • Purpose: Automates complex geometry and trigonometry formulas to save time and eliminate calculation errors.

How Does It Work?

Upon receiving your inputs, the tool automatically identifies the geometric case and applies the matching formula:

  • Three Sides (SSS): Uses the Law of Cosines to determine the unknown angles.

  • Two Sides & Included Angle (SAS): Calculates the third side first, then computes the remaining angles.

  • Right Triangles: Takes a shortcut using the Pythagorean Theorem ($a^2 + b^2 = c^2$).

  • Visual Representation: Automatically renders a scaled diagram alongside the exact numerical outputs for quick reference.


What Do the Letters a, b, c and A, B, C Mean?

Triangle calculators use a fairly standard labeling system, and it helps to know it before you start entering numbers. Side a sits opposite angle A, side b sits opposite angle B, and side c sits opposite angle C. So if the biggest angle in your triangle is labeled C, the longest side will be c, directly across from it.

A few other letters show up in the results too. T usually stands for the triangle's area, p for its perimeter, and s for the semiperimeter, which is half the perimeter and shows up inside Heron's formula. When the calculator gives you heights or medians, it labels them ha, hb, hc for the three heights and ma, mb, mc for the three medians, matching whichever vertex or side each one comes from. None of this changes how you use the calculator, but it does mean the output will line up with your own diagram once you know which letter belongs where. One more thing worth remembering is that the small triangle diagram shown next to your results is there to illustrate the parts, not to represent your triangle to exact scale.

What Input Combinations Does the Calculator Accept?

There are five standard ways to describe a triangle, and the calculator accepts any of them as long as one value is a side length.

Combination

What You Know

Common Situation

SSS (Side-Side-Side)

All three sides

You measured three lengths and want the angles

SAS (Side-Angle-Side)

Two sides and the angle between them

You know two edges and how they meet

ASA (Angle-Side-Angle)

Two angles and the side between them

Common in geometry problems and surveying

AAS (Angle-Angle-Side)

Two angles and a side that isn't between them

Same idea as ASA, different side position

SSA (Side-Side-Angle)

Two sides and an angle that isn't between them

Can sometimes produce two valid triangles

Most homework problems land in the SSS or SAS group, since those are the combinations you get from directly measuring a shape. ASA and AAS show up more often in formal geometry exercises. SSA is the one to watch, because it does not always settle on a single answer. There is more on that further down.

How the Calculator Uses the Law of Cosines and Law of Sines

For any triangle that isn't a right triangle, the calculator leans on two related rules. The Law of Cosines connects all three sides to one angle, and it is the tool the calculator reaches for first whenever you have given it three sides, or two sides with the angle between them. Once one angle or the missing side is known, the Law of Sines takes over. It says that a side and the sine of its opposite angle keep a constant ratio across the whole triangle, which makes the rest easy to fill in.

Say you know two sides of five and seven units, with a 45 degree angle between them. The calculator first applies the Law of Cosines to find the third side, then switches to the Law of Sines to work out the two remaining angles. From just those three starting values, you end up with a fully solved triangle.

How the Calculator Uses the Pythagorean Theorem for Right Triangles

Right triangles get a shortcut. When one angle is exactly 90 degrees, the relationship between the sides simplifies to the Pythagorean theorem: the square of the hypotenuse equals the sum of the squares of the other two sides. A classic example is a triangle with legs of 3 and 4, which always gives a hypotenuse of 5.

This shortcut only applies once the calculator detects a right angle. For every other triangle, it falls back on the Law of Cosines and Law of Sines described above.

What Other Properties Can the Calculator Find?

Beyond the six basic values of three sides and three angles, the calculator also works out a handful of properties that become useful once the shape is fully known. Area and perimeter are the two people ask for most, usually for something practical like flooring, land measurement, or a construction estimate. Height and median matter more in geometry and drafting work. Inradius and circumradius come up least often, but they are there for anyone working with circles drawn inside or around a triangle.

How the Calculator Finds Area, Including With Heron's Formula

There is more than one way to find a triangle's area, and which one the calculator uses depends on what you gave it. If a base and height are known, it is the simplest case: multiply the two together and divide by two. When you have two sides and the angle between them, the calculator multiplies the two sides by the sine of that angle and halves the result.

The trickier case is when you only have three sides and no height or angle at all. That is where Heron's formula comes in, a method first published by the Greek mathematician Heron of Alexandria roughly two thousand years ago. It works by adding the three sides together to get the perimeter, halving that to get the semiperimeter, and then combining all four numbers under a square root.

Step

What You Do

Example (sides 3, 4, 5)

1. Add the sides

a + b + c

3 + 4 + 5 = 12

2. Find the semiperimeter

s = (a + b + c) / 2

s = 12 / 2 = 6

3. Apply Heron's formula

Area = square root of s(s-a)(s-b)(s-c)

Area = sqrt(6 x 3 x 2 x 1) = 6

For this triangle, the area comes out to exactly 6 square units, which matches what you would get from the simpler base-height formula, since this particular set of sides also happens to form a right triangle.

How the Calculator Finds Perimeter, Height, and Median

Perimeter is the easiest of the group: add the three sides together and you are done. Height and median take a little more explaining, since every triangle actually has three of each, one running from each vertex.

A height, or altitude, is the straight, perpendicular line from a vertex down to the opposite side. A median runs from a vertex to the exact midpoint of the opposite side instead. These usually land in different places unless the triangle is isosceles or equilateral, where symmetry can make some of them overlap. If your results show three different height values, that is expected. It is not an error, just three different measurements taken from three different corners.

How the Calculator Finds the Inradius and Circumradius

These two values relate a triangle to circles rather than lines. The inradius is the radius of the largest circle that fits neatly inside the triangle while touching all three sides. You find it by dividing the triangle's area by its semiperimeter. The circumradius is the opposite idea: the radius of the circle that passes through all three corners of the triangle, found by taking any side and dividing it by twice the sine of the angle directly across from it.

Unlike height and median, a triangle only has one inradius and one circumradius, no matter which side or angle you use to work it out. Most everyday users will not need these two numbers, but they matter in fields like engineering and design work involving circular fittings or layouts.

What Triangle Types Does the Calculator Identify?

Once every side and angle is solved, the calculator can also tell you what kind of triangle you are dealing with. There are two separate classification systems here, one based on side lengths and one based on angles, and a triangle can belong to a category from each list at the same time.

Equilateral, Isosceles, and Scalene

These three categories describe a triangle purely by its side lengths. An equilateral triangle has all three sides equal, and as a direct result, all three angles work out to exactly 60 degrees. An isosceles triangle has exactly two equal sides, a shape that shows up often in real structures like roof trusses and gable ends. A scalene triangle has three different side lengths and, in turn, three different angles.

Right, Acute, and Obtuse

This second system classifies a triangle by its angles instead. A right triangle has one angle at exactly 90 degrees. An acute triangle has all three angles under 90 degrees. An obtuse triangle has one angle over 90 degrees. Since a triangle can never have two angles at 90 degrees or more, given that the three angles always add up to 180, these three categories cover every possible triangle without any overlap.

These two systems work independently of each other, so it is entirely normal for the calculator to describe your triangle as both isosceles and right at the same time. A classic 45-45-90 triangle is exactly that combination.

Classification Type

Category

How to Recognize It

By sides

Equilateral

All three sides equal, all angles 60 degrees

By sides

Isosceles

Exactly two sides equal

By sides

Scalene

All three sides different lengths

By angles

Right

One angle equal to 90 degrees

By angles

Acute

All three angles under 90 degrees

By angles

Obtuse

One angle over 90 degrees

Why Do Some Inputs Fail to Produce a Valid Triangle?

Not every set of three numbers can actually form a triangle. Before the calculator returns a result, it checks whether your inputs describe a shape that can physically close. If they do not, you will see an error instead of a set of angles, and it helps to know why that happens rather than assume the tool got something wrong.

The Triangle Inequality Rule

The rule is simple: the sum of any two sides has to be greater than the third side, or the shape cannot close at all. Try sides of 2, 3, and 10, for instance. Two plus three is only five, nowhere near enough to reach the far end of a side that is ten units long, so no triangle exists with those measurements. This check only applies when you have entered three sides. If your inputs include angles instead, this particular error will not come up, since the geometry works differently in that case.

The Ambiguous SSA Case

There is one input combination that can quietly produce two different correct answers: two sides plus an angle that is not between them, known as SSA. Picture the known angle and one side as fixed, with the second side free to swing around like a hinge. Depending on its length, that swinging side can meet the base at two different points, each producing a valid but different triangle.

When the calculator detects this situation, it shows both possible solutions rather than picking one at random. If you were expecting a single answer and get two instead, this ambiguous case is almost always the reason.

How Does This Calculator Connect to Other Geometry Tools?

A full triangle calculator covers every situation, but sometimes you already know more about your shape than a generic three-value input requires. When that is the case, a narrower, purpose built tool can get you to an answer faster. Here is where each related calculator fits in.

Right Triangle Calculator

If you already know one angle is 90 degrees, the right triangle calculator skips the general trigonometric laws and works from just two known values instead of three. It still relies on the Pythagorean theorem and basic trig ratios underneath, but the simpler two-value setup makes it quicker for anyone who already knows they are dealing with a right angle.

Special Right Triangles (30-60-90 and 45-45-90)

Two particular right triangles come up often enough in textbooks and design work that they get their own shortcut. A 30-60-90 triangle always keeps its sides in a 1 to root 3 to 2 ratio, and a 45-45-90 triangle keeps a 1 to 1 to root 2 ratio. Once you know just one side, the rest follow automatically, with no Law of Sines or Cosines required. The special right triangles calculator applies these fixed ratios directly.

Pythagorean Theorem Calculator

When all you need is a missing side of a right triangle, and nothing about the angles or area, the Pythagorean theorem calculator is the faster route. It applies a squared plus b squared equals c squared and hands back the missing length without solving the whole triangle.

Triangle Area Calculator

Sometimes area is the only number that matters, for a flooring job, a plot of land, or a landscaping estimate. The triangle area calculator accepts three sides, two sides and an angle, or a base and height, and skips straight to the square footage without solving every angle first.

Isosceles Triangle Calculator

If you already know your triangle has two equal sides, the isosceles triangle calculator only needs the base and one leg, or the base and the base angle, to solve everything else. It is a common shape in roof trusses, gables, and A-frame structures, so a dedicated tool saves a step for anyone working with that shape regularly.

Law of Sines and Law of Cosines Calculators

For anyone who wants to apply just one formula at a time, maybe to check a single step of a homework problem, the Law of Sines calculator and the Law of Cosines calculator isolate each rule on its own. The Law of Sines calculator fits best when you have an angle and its opposite side, while the Law of Cosines calculator handles three sides or two sides with an included angle.

Triangle Angle Calculator

When the only thing missing is a single angle, the triangle angle calculator skips past area, perimeter, and every other derived value to give you just that one number, using the angle sum rule or the Law of Sines depending on what you have entered.

Perimeter Calculator

Perimeter is already built into the full triangle calculator, but if you are working across different shapes and not just triangles, the perimeter calculator covers rectangles, regular polygons, and more in one place.

Frequently Asked Questions

Can any three side lengths form a triangle?

No. The three lengths need to satisfy the triangle inequality rule, meaning the sum of any two of them has to be greater than the third. Sides of 1, 2, and 5 will never close into a triangle, and the calculator will flag that input as invalid.

Why don't my triangle's angles add up to exactly 180 degrees?

This is almost always a rounding issue. If you enter sides with only one or two significant figures, the calculator has less precision to work with, and the resulting angles get rounded too. Adding more decimal places to your side lengths usually fixes it.

What's the difference between the Law of Sines and the Law of Cosines?

The Law of Sines relates a side to the sine of its opposite angle and works best when you know an angle-side pair. The Law of Cosines relates all three sides to one angle and fits better when you have three sides, or two sides with the angle between them.

Can a right triangle have all three sides equal?

No. An equilateral triangle always has three 60 degree angles, while a right triangle needs one angle at exactly 90 degrees. The two shapes cannot overlap.

What units can I use when entering my measurements?

Any consistent unit works: inches, feet, centimeters, or meters. Angles can be entered in degrees or radians. The only rule is that all three side inputs need to use the same unit for the result to come out correct.


Related Calculators

System of Inequalities Calculator

Instantly solve systems of linear and non-linear inequalities step-by-step with interactive overlapping shaded regions, solid/dashed boundary lines, and 2D/3D graphs.

Leave Your Feedback

Help us improve this calculator

Rating

Recent Feedback

No feedback yet.