Triangle Calculator
Triangle calculator: enter any three values, including at least one side, to get all sides and angles, area, perimeter, heights, medians and inradius.


Input Data








| EQUILATERAL ACUTE TRIANGLE | |||
|---|---|---|---|
| Side a | 5 | Angle A | 60° = 1.047198 rad |
| Side b | 5 | Angle B | 60° = 1.047198 rad |
| Side c | 5 | Angle C | 60° = 1.047198 rad |
| Area | 10.82532 | Height ha | 4.330127 |
| Perimeter p | 15 | Height hb | 4.330127 |
| Semiperimeter s | 7.5 | Height hc | 4.330127 |
| Median ma | 4.330127 | Inradius r | 1.443376 |
| Median mb | 4.330127 | Circumradius R | 2.886751 |
| Median mc | 4.330127 | ||
There was an error with your calculation.


How to Solve Any Triangle: Sides, Angles, Area, and More
Last updated: December 1, 2026
Table of Contents
This triangle calculator solves any triangle, not just right triangles, from three known values: three sides, two sides and an angle, or one side and two angles. It uses the law of sines and the law of cosines to calculate:
- missing side lengths,
- missing triangle angles,
- area,
- perimeter,
- semiperimeter,
- heights to all sides of the triangle,
- medians to all sides of the triangle,
- inradius,
- circumradius.
Angles are shown in degrees and radians, and the heading of the results table names the triangle type, for example "scalene acute triangle" or "isosceles right triangle."
How to Use the Triangle Calculator
Enter any three known values into the fields: angles A, B, and C on the first row, sides a, b, and c on the second. Any combination works, as long as at least one value is a side length; three angles alone describe infinitely many similar triangles of different sizes.
Angles are entered in degrees. If an angle is in radians, for example \$\frac{π}{3}\$, convert it to degrees first by multiplying by 180/π, which gives 60°. Then click "Calculate." The solver returns all the values from the list above.
To understand the math behind the results, see the formulas in the sections below.
Input Limitations
The triangle solver follows these geometric rules:
First, at least one of the known values must be a side length.
When entering two angles and one side length, the sum of the two angles must be less than 180° (π radians).
When entering three side lengths, the sum of any two sides must be greater than the third side, as the triangle inequality theorem requires. Otherwise, the calculator shows an error.
Example: Solving a Triangle From Two Sides and an Angle
Imagine you are moving and want to borrow a truck from a friend. You need to load and unload heavy boxes, but the truck has no built-in ramp. You own a portable ramp, but you need to check that it matches the truck's height before borrowing it.
Your ramp is not adjustable. You measure it and find that two of its sides are 1 m and 0.8 m long, and the angle opposite the 1 m side is exactly 85 degrees (as shown in the image). You also know that the truck's tailgate height can be adjusted anywhere from 0.5 m to 1 m. Will your ramp fit?
Given
- side b = 1;
- side c = 0.8;
- angle B = 85 degrees.
Solution
To determine whether your ramp fits, you need to solve the triangle and check if the length of side a falls within the truck's adjustable height range: 0.5 < a < 1.
Enter the known values into the triangle calculator. It computes all the missing values, but for this example we only need the missing side and the angles:
Answer
-
Side a = 0.67376
-
Side b = 1
-
Side c = 0.8
-
angle A = 42.16° = 42°9'35" = 0.73582 rad
-
angle B = 85° = 1.48353 rad
-
angle C = 52.84° = 52°50'25" = 0.92224 rad
The resulting ramp configuration looks like this:

The required height is a ≈ 0.674 m. Since the truck's height can be set anywhere in the 0.5 < a < 1 range, the ramp fits, and you can borrow the truck from your friend instead of renting one.
What Is a Triangle?
In geometry, a triangle is a flat figure formed by three line segments that connect three points not lying on one straight line. It is the simplest polygon, with three vertices and three edges, which are usually called its sides.
Conditions for a Triangle to Exist
For a triangle to exist, it must satisfy two rules: one for its sides and one for its angles.
The rule for the sides is known as the triangle inequality theorem. It states that the sum of any two sides of a triangle must be greater than the third side. If the two shorter sides add up exactly to the third side, the result is a "degenerate" triangle.
In a degenerate triangle, all three vertices lie on the same straight line, so the "triangle" is just a line segment. This special case is usually excluded from elementary geometry, and our calculator does not accept it.
The rule for the angles states that the interior angles of any triangle add up to exactly 180° (π radians).
Triangle Formulas
Here are the main triangle measurements and the formulas used to calculate them.
The perimeter of a triangle is the distance around it, the sum of its three sides:
p = a + b + c
The semiperimeter is half of the perimeter:
$$s=\frac{p}{2}=\frac{a+b+c}{2}$$
The area of a triangle is the space enclosed by its three sides. If you know the lengths of two sides and the measure of the angle between them (the included angle), you can calculate the area using this formula:
$$A=\frac{1}{2}a× b×\sin{C}$$
A triangle's height (or altitude) is a perpendicular line segment drawn from a vertex to the opposite side (or its extension). Since a triangle has three vertices, it has three heights. The altitude drawn to side a is typically denoted as hₐ. Similarly, the other two heights are represented as \$h_b\$ and h꜀. The easiest way to find a triangle's height is from its area:
$$A=\frac{1}{2}× a× h_a=\frac{1}{2}× b× h_b=\frac{1}{2}× c× h_c$$
$$h_a=\frac{2A}{a}, h_b=\frac{2A}{b}, h_c=\frac{2A}{c}$$
A median of a triangle is a line segment connecting a vertex to the midpoint of the opposite side, so every triangle has three medians.

The median drawn to side a is denoted as mₐ. Likewise, the other two medians are represented as \$m_b\$ and m꜀. The length of a median is:
$$m_a=\frac{1}{2}\sqrt{2b^2+2c^2-a^2}$$
The inradius of a triangle is the radius of the inscribed circle, the largest circle that fits inside the triangle, touching all three sides.

The length of the inradius r can be calculated using the area (A) and the semiperimeter (s):
$$r=\frac{A}{s}$$
The circumradius of a triangle is the radius of the circumscribed circle, which passes through all three vertices.

The circumradius R follows from the law of sines:
$$2R=\frac{a}{\sin{A}}=\frac{b}{\sin{B}}=\frac{c}{\sin{C}}$$
The law of sines is used to find missing sides or angles. The other key theorem for solving triangles is the law of cosines:
$$a=\sqrt{b^2+c^2-2bc\cos{A}}$$
$$b=\sqrt{a^2+c^2-2ac\cos{B}}$$
$$c=\sqrt{a^2+b^2-2ab\cos{C}}$$
These formulas are all you need to calculate any triangle measurement by hand. The triangle calculator applies the same formulas to find all the missing values at once.