Enter what you know
Choose a solve mode, fill in the inputs, then tap Calculate. The calculator validates the triangle (triangle inequality + angle rules) before producing results.
Use this Triangle Calculator to solve area, perimeter, and missing sides / angles in seconds. Pick the method you know (SSS / SAS / base+height / right triangle), enter what you have, and get a clean result you can screenshot and share.
Choose a solve mode, fill in the inputs, then tap Calculate. The calculator validates the triangle (triangle inequality + angle rules) before producing results.
Triangles are one of those rare topics where the math is both simple and surprisingly powerful. Once you know what information you have (sides, angles, or a base and height), you can compute almost everything else. This calculator supports the most common pathways you’ll see in school, construction, and DIY measurement: Heron’s formula (SSS), base × height, and trigonometry (SAS).
A triangle can only exist if the sum of any two side lengths is strictly greater than the third side: a + b > c, a + c > b, b + c > a. If you enter sides that violate this rule, your “triangle” collapses into a straight line (or can’t be drawn at all), so the calculator stops and tells you what failed.
The perimeter is just the total distance around the triangle: P = a + b + c. Many triangle formulas also use the semi-perimeter: s = (a + b + c) / 2. That “s” value shows up in Heron’s formula and is a common intermediate step.
If you know all three sides, you can compute each angle using the Law of Cosines. For example, angle C opposite side c: cos(C) = (a² + b² − c²) / (2ab), then C = arccos(…). The calculator does this for all three angles when enough information is available.
If a triangle has a 90° angle, the longest side is the hypotenuse c. The Pythagorean theorem says a² + b² = c². That makes right-triangle problems the fastest to solve: give two values, and the third is one square root away.
Not every set of measurements defines a single triangle. Three sides (SSS) always define exactly one triangle (if valid). Two sides plus the included angle (SAS) also defines exactly one triangle. But two sides alone (SS) does not — you can “swing” the third vertex to create multiple possible triangles. And two angles alone (AA) only defines a triangle up to scale (similar triangles), unless you also know a side. This calculator focuses on the input sets people actually use most often.
Suppose a triangle has sides a = 7, b = 8, c = 9. First, check validity: 7+8>9, 7+9>8, 8+9>7. It’s valid. Perimeter is P = 24. Semi-perimeter is s = 12. Heron’s area is A = √(12·5·4·3) = √720 ≈ 26.833 square units. The calculator also uses Law of Cosines to compute angles and tells you this is a scalene triangle.
If your base is b = 10 and the perpendicular height is h = 6, the area is A = (10×6)/2 = 30. This is the cleanest method when a height is explicitly given (common in geometry homework).
Let a = 5, b = 9, and included angle C = 40°. Area is A = ½·5·9·sin(40°) ≈ 14.46. The third side comes from Law of Cosines: c = √(a² + b² − 2ab cos(C)). Once c is known, perimeter follows and remaining angles can be solved.
If legs are a = 3 and b = 4, the hypotenuse is c = √(3²+4²)=5. Area is A = (3×4)/2 = 6. This is the classic “3-4-5” triangle.
If c = 13 and a = 5, then b = √(13²−5²) = √144 = 12. Area is A = (5×12)/2 = 30. This forms the well-known “5-12-13” triple.
The calculator’s job is essentially to pick the right formula chain, validate the inputs, and format the result clearly. That’s simple in words, but in practice it means preventing the classic “almost correct” mistakes: mixing units, using a non-included angle in SAS, or allowing an invalid triangle to slip through. Below is exactly what the calculator does after you press “Calculate.”
The solve mode tells the calculator what you’re providing: three sides (SSS), base + height, two sides + included angle (SAS), or a right triangle variant. This matters because the first formula we choose determines everything that comes after. For example, if we have SSS, we can compute area with Heron’s formula immediately. If we have SAS, we compute the third side first.
Validity checks are not “extra” — they prevent nonsense outputs. For SSS, triangle inequality must hold. For angle-based modes, angles must be between 0 and 180 degrees. For right-triangle hypotenuse mode, the hypotenuse must be longer than the leg. If any check fails, we show a clear message.
In SAS, we compute the third side using the Law of Cosines. In right-triangle modes, we compute the missing side via the Pythagorean theorem. Once all three sides are known, the rest of the triangle can be solved consistently.
Perimeter is always the sum of sides when sides are available. Area is computed using the most stable formula for the chosen mode. Angles are computed from sides using the Law of Cosines to avoid ambiguity. For right triangles, the acute angles are computed with inverse trigonometry so you get a complete set of angles.
The calculator labels the triangle in two ways: side type (equilateral / isosceles / scalene) and angle type (acute / right / obtuse). These labels are a quick “reasonableness” check: if you expected an isosceles triangle but you typed different sides, you’ll catch it immediately.
Finally, we format the output as a compact summary that’s easy to screenshot or paste into a chat. This is very intentional: triangles show up in study groups, DIY projects, and quick “does this make sense?” checks, and a clean summary saves time.
If you know a base and the perpendicular height, use A = (b×h)/2. It’s the simplest and least error-prone. If you only know three sides, use Heron’s formula (SSS mode).
Most often it’s triangle inequality: one side is too long compared to the other two, e.g. a+b ≤ c. If you’re using angles, it can also be because an angle is 0/180 or outside range.
Input is in degrees. Internally, trigonometric functions use radians, and we convert automatically.
Not uniquely (unless it’s a right triangle and you know which side is the hypotenuse). Two sides without an angle can describe multiple triangles.
Yes. In SSS and SAS modes, the Law of Cosines handles acute and obtuse cases, and we label the angle type accordingly.
Height is perpendicular to the base (an altitude). Unless your triangle is right-angled in a specific way, height is not equal to any side.
Yes — use it to verify answers, then try re-solving by hand to build intuition. The worked examples above match the calculator’s internal methods.
Hand-picked interlinks from the Math & Conversion category:
Want to go deeper? Try the Triangle Type tool to classify triangles quickly, or Pythagorean Theorem for right-triangle speed.