PLANE GEOMETRY

Triangle Calculator

Solve a triangle from three sides, two sides and an angle, two angles and a side, or the legs of a right triangle. Get its missing dimensions, area, perimeter, radii, altitudes, medians, a labeled diagram, and clear calculation steps.

INPUTS

Enter the measurements you know

The three sides must satisfy the triangle inequality: the sum of any two must exceed the third. Angles are in degrees; area is reported in square units.

Press Enter to calculate
Try an example

YOUR ANSWER

Triangle measurements

Area6 cm²K = ½ × base × height
Perimeter12 cmP = a + b + c
Semiperimeter6 cms = P/2
Angles A · B · C36.8699° · 53.1301° · 90°A + B + C = 180°
Altitudes hₐ · hᵦ · h𝚌4 · 3 · 2.4 cmh = 2K/side
Inradius · circumradius1 · 2.5 cmr = K/s · R = abc/(4K)
Medians mₐ · mᵦ · m𝚌4.272 · 3.6056 · 2.5 cmEach joins a vertex to the opposite midpoint
Triangle side and angle diagramTriangle with sides a 3 cm, b 4 cm, c 5 cm; angles A 36.8699 degrees, B 53.1301 degrees, and C 90 degrees.ABCc = 5 cmb = 4a = 336.8699°53.1301°90°
Side a is opposite angle A; the same opposite-side convention applies to b/B and c/C.
Step-by-step solution
  1. Check the triangle inequality: 3 + 4 > 5, 3 + 5 > 4, and 4 + 5 > 3.
  2. Use the law of cosines for angle A: cos(A) = (b² + c² − a²)/(2bc), giving A ≈ 36.869897646°.
  3. Use the law of cosines for angle B: cos(B) = (a² + c² − b²)/(2ac), giving B ≈ 53.130102354°.
  4. The remaining angle is C = 180° − A − B ≈ 90°.
  5. The semiperimeter is s = (a + b + c)/2 = 6. Heron’s formula gives K = √[s(s − a)(s − b)(s − c)] ≈ 6 square units.
  6. Perimeter P = a + b + c ≈ 12 units. Each altitude follows h = 2K/side; the inradius is r = K/s and circumradius is R = abc/(4K).

Triangle formulas

A triangle has three sides and three interior angles. In this calculator, side a is opposite angle A, side b is opposite B, and side c is opposite C. The interior angles add to 180°. A valid, non-degenerate triangle also satisfies the triangle inequality: a + b > c, a + c > b, and b + c > a.

Perimeter and semiperimeterP = a + b + c; s = P/2Add the three side lengths.
Heron’s area formulaK = √[s(s − a)(s − b)(s − c)]Find area from all three sides.
Law of cosinesc² = a² + b² − 2ab cos(C)Find a missing side or angle.
Law of sinesa/sin(A) = b/sin(B) = c/sin(C)Relate each side to its opposite angle.
Altitudehₐ = 2K/aArea is half the base times its perpendicular height.
Radii and medianr = K/s; R = abc/(4K); mₐ = ½√(2b² + 2c² − a²)Inradius, circumradius, and median to side a.

How to use the triangle calculator

  1. Choose a mode that matches your known information: SSS, SAS, ASA/AAS, or right-triangle legs.
  2. Enter positive side lengths in one shared unit. Enter angles in degrees.
  3. Select the display precision and press Solve triangle. The result appears directly below the input panel.
  4. Review the labeled diagram and steps, then copy the measurements if you need them elsewhere.

Worked example: a 3–4–5 right triangle

Let the perpendicular legs be 3 cm and 4 cm. By the Pythagorean theorem, the hypotenuse is c = √(3² + 4²) = √25 = 5 cm. The area is K = ½(3)(4) = 6 cm², and the perimeter is P = 3 + 4 + 5 = 12 cm. The angles opposite the 3 cm and 4 cm legs are approximately 36.87° and 53.13°; together with 90°, they total 180°.

Understanding SSS, SAS, and ASA

SSS means all three side lengths are known. The calculator checks the triangle inequality and uses the law of cosines to recover angles. SAS means two sides and their included angle are known; the law of cosines finds the third side. ASA/AAS uses two angles and a side; first find the remaining angle from the 180° angle sum, then use the law of sines to determine the missing lengths. The right-triangle mode treats the two supplied sides as perpendicular legs.

Common mistakes

Frequently asked questions

How do I calculate the area of a triangle?

With a base and its perpendicular height, use K = ½bh. If only the three sides are known, use Heron’s formula: K = √[s(s − a)(s − b)(s − c)], where s = (a + b + c)/2.

What is the triangle inequality?

Each pair of side lengths must sum to more than the remaining side. Equality would make the triangle flat rather than a proper triangle.

Can I solve a triangle with two sides only?

Not in general. You need an additional measurement, such as the included angle, a right angle, or enough angle information to determine a unique triangle.

What do the inradius and circumradius mean?

The inradius is the radius of the circle tangent to all three sides inside the triangle. The circumradius is the radius of the circle passing through all three vertices.

Are the displayed answers exact?

The calculator uses full floating-point precision internally and displays rounded decimal values according to your selected precision. The steps show the formulas used.

Related geometry calculators