Triangle Calculator
- With three sides, use Heron's formula. Semiperimeter s = (3 + 4 + 5) ÷ 2 = 6.
- Area = √(s(s−a)(s−b)(s−c)) = √(6 × 3 × 2 × 1) = 6 square units. The perimeter is simply 12.
- Side lengths make this a scalene triangle, and the two shorter sides squared sum exactly to the longest squared, so it is right-angled too.
A triangle calculator solves for every missing value in a triangle from whatever you know. Enter three sides, two sides and an angle, or a base and height, and it returns area, perimeter, the remaining sides or angles, and a full classification. It checks the triangle inequality — the two shorter sides must sum to more than the longest — so you are told immediately whether your inputs can form a triangle at all. Three standard routes to area are supported: ½ × base × height, Heron's formula from three sides, and ½ × a × b × sin(C) from two sides and the included angle. Verified examples include base 10 and height 6 giving area 30, the 3-4-5 triangle giving area 6 with perimeter 12, and sides 5 and 7 with a 60° included angle giving area 15.155 with a third side of 6.245 and perimeter 18.24.
These methods are the accepted standard because they rest on classical geometry that has been verified for centuries and leave no ambiguity in the result. Heron's formula gives area directly from side lengths without needing height, while the law of cosines extends the Pythagorean relationship to any angle, making the approach valid for acute, right, and obtuse triangles alike. Classification by sides (equilateral, isosceles, scalene) and by angles (right, acute, obtuse) is independent, and this calculator applies both. This page shows the exact formula used, step-by-step workings for your inputs, worked examples, and the sources behind each calculation.
Worked examples
Base 10, height 6
Area 30 square units by the half-base-times-height rule every other mode must agree with. (Base and height · 10 · 6 · 3 · 4 · 5 · 60 °)
| Area | 30 |
| Base | 10 |
| Height | 6 |
The 3-4-5 triangle
Heron's formula gives exactly 6 — and the side check flags it as scalene and right-angled. (Three sides · 10 · 6 · 3 · 4 · 5 · 60 °)
| Area | 6 |
| Perimeter | 12 |
| Semiperimeter | 6 |
| Type | Scalene — and right-angled |
Sides 5 and 7 with 60° between them
Area 15.155 by the SAS formula; the law of cosines completes the third side at 6.245. (Two sides + included angle · 10 · 6 · 5 · 7 · 5 · 60 °)
| Area | 15.1554 |
| Third side | 6.245 |
| Perimeter | 18.245 |
Three ways in, one area
A triangle calculator needs to handle the three standard routes to area because you rarely get to choose your data. The method you use depends entirely on which measurements you have in front of you, not on personal preference. Each route has its own home territory, and each one has been verified with a concrete example so you can confirm the math yourself.
The first route is the one most people remember from school: one-half times base times height. When you know a base and the corresponding height measured straight up from it, the area is simply ½ x base x height. A triangle with base 10 and height 6 gives area 30, and that result holds whether the triangle leans to one side or stands perfectly upright. This is the go-to method when a height is given or can be measured directly, and it is also the easiest to visualize.
The second route applies when you have all three sides but no height. Heron's formula computes the area directly from the side lengths: area = sqrt(s(s-a)(s-b)(s-c)), where s is the semiperimeter, half the perimeter. The classic 3-4-5 triangle illustrates this cleanly. Its perimeter is 12, so s equals 6, and Heron's formula returns an area of exactly 6. That triangle is scalene and right-angled, which also serves as a reminder that triangles classify in two independent ways: by sides (equilateral, isosceles, scalene) and by angles (right, acute, obtuse). One classification does not determine the other.
The third route covers the case where you know two sides and the angle sandwiched between them. The area is ½ x a x b x sin(C), where C is the included angle. Sides 5 and 7 with a 60° included angle give area 15.155, and the law of cosines completes the picture by producing the third side as 6.245, for a perimeter of 18.24. This is the method you reach for when an angle measurement is easier to obtain than a height, which comes up constantly in surveying and navigation.
- Base and height: use ½ x base x height when a height is known or measurable. Verified: base 10, height 6 gives area 30.
- Three sides: use Heron's formula, area = sqrt(s(s-a)(s-b)(s-c)) with s the semiperimeter. Verified: the 3-4-5 triangle gives area exactly 6 (s = 6, perimeter 12, scalene and right-angled).
- Two sides and included angle: use ½ x a x b x sin(C). Verified: sides 5 and 7 with a 60° angle give area 15.155; the law of cosines gives the third side as 6.245 (perimeter 18.24).
Worked examples, one per method
The table below shows three verified triangles, each solved with a different method. Together they cover the three standard routes to area that a triangle calculator uses: ½ × base × height, Heron's formula from three sides, and ½ × a × b × sin(C) from two sides and the included angle. Each row lists the method, the inputs you would enter, and the resulting area.
Notice that base-and-height and Heron's formula agree wherever both can be computed. For the first triangle, the base and height are given directly, so the area is simply ½ × 10 × 6 = 30. For the 3-4-5 triangle, Heron's formula gives area exactly 6, with s = 6 as the semiperimeter and a perimeter of 12. The 3-4-5 triangle is scalene and right-angled, which illustrates that the side-based classification (equilateral, isosceles, scalene) and the angle-based classification (right, acute, obtuse) are independent — a triangle can be scalene and right-angled at the same time.
The third example starts with two sides and the included angle: sides 5 and 7 with a 60° included angle. The area from ½ × a × b × sin(C) is 15.155. The law of cosines completes the third side as 6.245, giving a perimeter of 18.24. Once that third side is known, Heron's formula could also be applied and would produce the same area, confirming the methods agree.
Before computing anything, the triangle inequality must hold: the two shorter sides must sum to more than the longest side, or the three lengths do not form a triangle at all. This calculator checks that condition automatically.
| Method | Inputs | Area |
|---|---|---|
| ½ × base × height | Base 10, height 6 | 30 |
| Heron's formula (three sides) | Sides 3, 4, 5 (s = 6, perimeter 12, scalene, right-angled) | 6 |
| ½ × a × b × sin(C) (two sides and included angle) | Sides 5 and 7, included angle 60° (third side 6.245, perimeter 18.24) | 15.155 |
How to use this triangle calculator
Choose the mode that matches the data you have. If you know two sides and the angle between them, use SAS mode — the angle must be the one included between the two given sides, not a free angle elsewhere in the triangle. If you know all three side lengths, use three-sides mode. In either case the triangle calculator applies the correct formula and reports the missing values along with a full classification.
In SAS mode the calculator uses ½ × a × b × sin(C) to find the area from two sides and the included angle, then applies the law of cosines to complete the third side. For example, sides 5 and 7 with a 60° included angle give area 15.155, and the law of cosines completes the third side as 6.245 for a perimeter of 18.24. In three-sides mode the calculator uses Heron's formula, area = sqrt(s(s-a)(s-b)(s-c)) where s is the semiperimeter, to find the area directly from the three side lengths. The classic 3-4-5 triangle gives area exactly 6 by Heron (s = 6) with a perimeter of 12, and it is classified as both scalene and right-angled.
Three sides only form a triangle if the two shorter ones sum to more than the longest side — the triangle inequality. This calculator checks that condition automatically, so the inequality check protects you from impossible triangles before any formula runs. If your three lengths fail the test, no valid triangle exists and no area, perimeter, or angles are reported.
Triangles classify by sides (equilateral, isosceles, scalene) and by angles (right, acute, obtuse). The two classifications are independent: a scalene triangle can be right, acute, or obtuse, and a right triangle can be scalene or isosceles. The calculator reports both classifications so you always know exactly what kind of triangle you are working with.
Heron's formula deserves its fame
Heron's formula deserves its fame because it cracks the area of a triangle using nothing but the three side lengths. You never need a height, and you never need an angle. For two thousand years, surveyors walked the edges of fields, recorded the lengths, and computed the acreage with this method. A triangle calculator does the same arithmetic today, but the underlying trick is unchanged. Given sides a, b, and c, you first find the semiperimeter s, which is half the perimeter, then plug into area = sqrt(s(s-a)(s-b)(s-c)). That expression looks dense, but it only multiplies four numbers and takes the square root.
The classic 3-4-5 triangle shows the formula at its cleanest. The perimeter is 12, so the semiperimeter s is 6. Drop each side from s and you get 3, 2, and 1. Multiply 6 x 3 x 2 x 1 for 36, take the square root, and the area is exactly 6. This triangle happens to be scalene and right-angled, which means no sides match and one angle is 90 degrees, yet Heron's formula did not need to know either fact. It only needed the three lengths.
Of course, three lengths will not always cooperate. They only form a triangle when the two shorter sides add up to more than the longest side, a rule called the triangle inequality. A triangle calculator checks this before doing anything else, because if the sides fail that test, there is no shape to measure. When the sides pass, the formula runs and the area follows. It works for equilateral, isosceles, and scalene triangles alike, and it does not care whether the angles are right, acute, or obtuse.
Heron's route is not the only one. Area also comes from ½ x base x height, which is the method most people learn first, and from ½ x a x b x sin(C) when you have two sides and the included angle. Each path lands on the same number. The base-height method gives 30 for a triangle with base 10 and height 6, and the sine method gives 15.155 for sides 5 and 7 with a 60-degree included angle. But only Heron's formula asks for sides and nothing else, which is why it stayed useful for centuries and why it still sits at the core of this triangle calculator.
Completing the triangle with the law of cosines
When you feed a triangle calculator two sides and the angle squeezed between them, it switches into SAS mode and reaches for the law of cosines. The formula is c = sqrt(a² + b² - 2ab cos C), where a and b are the known sides and C is the included angle. Plugging in sides of 5 and 7 with a 60° included angle confirms the result: the missing third side is 6.245, giving a perimeter of 18.24. The law of cosines is really just a generalization of the Pythagorean theorem that works for any angle, not just right angles.
Once all three sides are known, the same law of cosines flips around to solve for every remaining angle. You rearrange the formula to isolate the cosine of each angle, which means a single known side and angle pair unlocks the entire shape. The triangle calculator applies this step automatically, so you never have to retype values or switch tools mid-problem. With the third side nailed down, the two unknown angles fall out of the same equation.
Area follows naturally from there. Three standard routes exist: one-half times base times height when you have a perpendicular measurement, Heron's formula from three sides using area = sqrt(s(s-a)(s-b)(s-c)) where s is the semiperimeter, and one-half times a times b times sin(C) when you have two sides and the included angle. In the 5-7-60° example, the SAS area formula gives 15.155. Heron's formula gives a second path to the same result once the law of cosines has produced the third side, so the two methods serve as a built-in check on each other.
The 3-4-5 triangle shows the formula at its cleanest. Heron's formula gives area exactly 6 with a semiperimeter of 6 and a perimeter of 12, and the shape is scalene and right-angled. A simpler base-times-height check also works: a base of 10 and a height of 6 give an area of 30. The law of cosines handles every triangle the same way regardless of how it classifies by sides (equilateral, isosceles, scalene) or by angles (right, acute, obtuse), since those two classification systems are independent of each other. The only requirement is that the three sides actually form a triangle: the two shorter sides must sum to more than the longest side, a rule known as the triangle inequality. The calculator checks this before doing anything else.
Right triangles are the special case
A right triangle has exactly one 90-degree angle, and that single feature unlocks two shortcuts that a general triangle calculator can apply but does not require. To spot one from the side lengths alone, test the Pythagorean relationship: a² + b² = c², where c is the longest side. The familiar 3-4-5 triangle is the classic example, because 3² + 4² equals 5². This triangle is scalene by sides (all three lengths differ) and right-angled by angles, which is a useful reminder that the side-based and angle-based classifications are independent — a scalene triangle can also be acute or obtuse, and a right triangle can also be isosceles if its two legs are equal.
The 3-4-5 triangle is also a clean test case for the area formulas a triangle calculator relies on. With sides 3, 4, and 5, the perimeter is 12 and the semiperimeter s is 6. Plugging into Heron's formula, area = sqrt(s(s-a)(s-b)(s-c)), gives sqrt(6 × 3 × 2 × 1) = sqrt(36) = 6. That result matches what you get from the ½ × base × height route using the two legs: ½ × 3 × 4 = 6. Because the legs meet at 90 degrees, one leg is the base and the other is the height, with no extra trigonometry needed.
That same perpendicular relationship is why the half-the-product-of-the-legs shortcut works for every right triangle and for no other type. In a non-right triangle, the height measured from the base is shorter than the slanted side rising to the opposite vertex, so you cannot simply multiply two sides and halve the result. The general formula ½ × a × b × sin(C) handles that gap, because sin(C) accounts for the angle between the two known sides. When C is 90 degrees, sin(C) equals 1 and the formula reduces to ½ × a × b — the same shortcut derived from the right angle itself. For example, sides 5 and 7 with a 60-degree included angle give area 15.155, and the law of cosines completes the third side as 6.245 for a perimeter of 18.24; change that angle to 90 degrees and the area simply becomes ½ × 5 × 7 = 17.5.
A triangle calculator applies these routes in the background and also checks whether three entered sides can form a triangle at all. Three sides only form a triangle if the two shorter ones sum to more than the longest, a condition known as the triangle inequality. If that test fails, no area formula applies. When it passes, the calculator classifies the triangle by both sides and angles, identifies right triangles from the Pythagorean check, and returns the area through whichever method fits the inputs supplied.
FAQs
How do I find a triangle's area from three sides?
Use Heron's formula. First find the semiperimeter s = (a + b + c)/2, then compute area = sqrt(s(s-a)(s-b)(s-c)). For example, a 3-4-5 triangle gives exactly 6 for its area. This method works for any triangle when all three side lengths are known.
What is the area of a triangle with base 10 and height 6?
Use the standard formula area = 1/2 x base x height. Plugging in the values gives 1/2 x 10 x 6 = 30 square units. The height must be perpendicular to the chosen base for this calculation to be correct.
How do I find the area with two sides and the angle between them?
Use the formula Area = 1/2ab sin(C), where a and b are the two known sides and C is the angle between them. For example, sides 5 and 7 with 60 degrees between them give 15.155 as the area.
Can sides 2, 3 and 6 make a triangle?
No. The triangle inequality requires that any two sides added together must be greater than the third side. Here, 2 + 3 is not greater than 6, so these lengths cannot form a triangle. The calculator flags such inputs instead of returning a nonsense area.
Is a 3-4-5 triangle right-angled?
Yes. A triangle is right-angled when the sum of the squares of two shorter sides equals the square of the longest side. Here, 3 squared plus 4 squared equals 5 squared, so the angle opposite the side of 5 is exactly 90 degrees.
What is a semiperimeter?
The semiperimeter is half the perimeter of a triangle, calculated as s = (a + b + c)/2. It is the quantity Heron's formula is built from. For a 3-4-5 triangle, the semiperimeter s equals 6, which is then used in the area calculation.