Triangle Calculator
Calculate triangle properties including area, perimeter, sides, and angles using various methods. Supports SSS, SAS, ASA, and base-height calculations for all your geometry needs.
What Is a Triangle Calculator?
A triangle calculator is a mathematical tool that determines all properties of a triangle when given enough starting information. A triangle is defined by three sides and three angles, and knowing at least three of these six values (with at least one being a side) is sufficient to find the rest. This calculator accepts input through four standard methods and computes every remaining measurement including all sides, all angles, area, perimeter, heights, inradius, and circumradius.
Triangles are among the most fundamental shapes in geometry and appear everywhere in architecture, engineering, surveying, navigation, and physics. Whether you are calculating the pitch of a roof, the span of a bridge truss, or the distance between landmarks on a map, triangle calculations form the foundation. This tool eliminates the need for manual trigonometric computation and ensures accuracy through established mathematical formulas.
How Triangle Calculations Work
The calculator relies on two core principles from trigonometry: the Law of Cosines and the Law of Sines.
Law of Cosines relates the sides and an angle of any triangle. For a triangle with sides a, b, c and opposite angles A, B, C, the formula states c squared equals a squared plus b squared minus 2ab times the cosine of C. This formula is used to find a missing side when two sides and the included angle are known (SAS), or to find angles when all three sides are known (SSS).
Law of Sines states that the ratio of each side to the sine of its opposite angle is constant: a over sin(A) equals b over sin(B) equals c over sin(C). This relationship is particularly useful for ASA and AAS problems where angles and a single side are known.
Area calculation uses Heron's formula once all three sides are determined. The semi-perimeter s equals half the sum of the three sides, and the area equals the square root of s times (s-a) times (s-b) times (s-c). This elegant formula requires only the side lengths and no angle information.
Derived properties are computed from the basic results. The inradius r equals the area divided by the semi-perimeter. The circumradius R equals the product abc divided by four times the area. The height to each side equals twice the area divided by that side length.
How to Use This Calculator
Choose your solving method from the dropdown. The four options are SSS (three sides known), SAS (two sides and the included angle), ASA (two angles and the included side), and AAS (two angles and a non-included side).
Enter the known values. The input fields update to match your selected method. For angle inputs, enter values in degrees. For side inputs, use any consistent unit of length.
Review the full solution. The result panel displays all six values (three sides and three angles), the triangle classification (scalene/isosceles/equilateral and acute/right/obtuse), area, and perimeter.
Check additional properties. Scroll down to see the semi-perimeter, inradius, circumradius, and heights to each side.
Use the preset buttons to load common triangles like the 3-4-5 right triangle, an equilateral triangle, or an isosceles triangle. These presets help you verify the calculator and explore different triangle types.
Worked Examples
Example 1: SSS with a 3-4-5 Right Triangle
Enter sides a=3, b=4, c=5. The calculator finds angle A=36.8699 degrees, angle B=53.1301 degrees, angle C=90 degrees. Area is 6 square units. Perimeter is 12 units. This confirms the classic Pythagorean triple forms a right triangle.
Example 2: SAS Calculation
Enter side a=8, angle C=45 degrees, side b=6. Using the Law of Cosines, side c equals approximately 5.6691. Angle A is about 82.8192 degrees and angle B is about 52.1808 degrees. Area is approximately 16.9706 square units.
Example 3: ASA with Known Side Between Two Angles
Enter angle A=50 degrees, side c=12, angle B=70 degrees. The third angle C is 60 degrees. Using the Law of Sines, side a equals approximately 10.6158 and side b equals approximately 13.0182. Area is approximately 61.2850 square units.
Example 4: Equilateral Triangle
Enter sides a=10, b=10, c=10. All three angles equal exactly 60 degrees. Area is approximately 43.3013 square units. Perimeter is 30. The inradius is 2.8868 and the circumradius is 5.7735.
Common Use Cases
- Geometry homework: Verify manual solutions for triangle problems involving the Law of Cosines, Law of Sines, or area calculations.
- Surveying and land measurement: Determine distances and angles between survey points when direct measurement is impractical but some sides and angles are known.
- Architecture and construction: Calculate roof pitch angles, truss dimensions, and angled cuts from known measurements of structural members.
- Navigation: Compute distances between waypoints using triangulation when bearing angles and one reference distance are available.
- Physics: Resolve force vectors into components using triangle geometry, particularly for inclined plane and equilibrium problems.
- Art and design: Calculate proportions for triangular design elements, ensuring symmetry or achieving specific angle requirements.
Tips and Common Mistakes
Ensure units are consistent. All side lengths must use the same unit. If one side is in meters and another is in centimeters, convert them first. The calculator does not perform unit conversion.
Remember that angles must sum to 180 degrees. If you enter two angles that total 180 or more in ASA or AAS mode, the third angle would be zero or negative, which is impossible. The calculator will report this error.
Watch for the ambiguous case. While this calculator handles SSS, SAS, ASA, and AAS (which each have unique solutions), the SSA case (two sides and a non-included angle) can sometimes have two valid solutions. This version does not include SSA to avoid ambiguity.
Verify with the triangle inequality. Before entering SSS values, mentally check that the largest side is less than the sum of the other two. This saves time and avoids error messages.
Use the classification to check your work. If you expect a right triangle but the calculator says obtuse, double-check your input. The automatic classification is a useful sanity check on your measurements.
Frequently Asked Questions
What solving methods does this triangle calculator support?
The calculator supports four methods: SSS (three sides), SAS (two sides and the included angle), ASA (two angles and the included side), and AAS (two angles and a non-included side). Each method provides enough information to uniquely determine the triangle, allowing the calculator to find all remaining sides, angles, area, and perimeter from your input.
What is the Law of Cosines and when is it used?
The Law of Cosines states that c squared equals a squared plus b squared minus 2ab times the cosine of angle C. It generalizes the Pythagorean theorem to any triangle, not just right triangles. The calculator uses it for SSS problems to find angles from known sides, and for SAS problems to find the unknown side from two sides and their included angle.
How does Heron's formula calculate the area of a triangle?
Heron's formula computes the area using only the three side lengths. First calculate the semi-perimeter s, which is half the sum of all three sides. Then the area equals the square root of s times (s minus a) times (s minus b) times (s minus c). This formula works for any triangle and does not require knowing any angles or heights beforehand.
What does it mean if the calculator says my sides do not form a valid triangle?
The triangle inequality theorem states that each side must be strictly less than the sum of the other two sides. For example, sides 1, 2, and 5 cannot form a triangle because 1 plus 2 equals 3, which is less than 5. If your inputs violate this rule, no triangle exists with those dimensions. Adjust the values so that the longest side is shorter than the sum of the other two.
How are the inradius and circumradius calculated?
The inradius is the radius of the largest circle that fits inside the triangle, computed as the area divided by the semi-perimeter. The circumradius is the radius of the circle that passes through all three vertices, computed as the product of all three sides divided by four times the area. Both values are derived automatically once the sides and area are known.
Can this calculator handle right triangles specifically?
Yes. Enter the three sides of a right triangle using SSS mode, and the calculator will correctly identify one angle as 90 degrees and classify the shape as a right triangle. It uses the same general formulas that apply to all triangles, but the results will confirm right-angle properties. The 3-4-5 preset demonstrates this case.
What is the difference between ASA and AAS?
In ASA, the known side is between the two known angles. In AAS, the known side is opposite one of the known angles rather than between them. Both methods yield a unique triangle, but the internal calculation steps differ slightly. ASA first computes the third angle, then uses the Law of Sines. AAS also computes the third angle first, then applies the Law of Sines with the side opposite its corresponding angle.
How accurate are the results from this calculator?
Results are computed using double-precision floating-point arithmetic and displayed to four decimal places. This provides more than enough accuracy for educational, engineering, and practical measurement purposes. Rounding errors are negligible for typical input values. If you need exact symbolic results, a computer algebra system would be more appropriate.
Related Calculators
Basic Calculator
Free basic calculator for addition, subtraction, multiplication, and division. Easy-to-use online calculator with history feature and responsive design.
Scientific Calculator
Free scientific calculator with trigonometric, logarithmic, exponential functions. Includes sin, cos, tan, log, ln, powers, roots, constants π and e, memory functions.
Percentage Calculator
Free online percentage calculator. Calculate percentage of a number, percentage increase/decrease, what percent is X of Y, and percent change between values.
Fraction Calculator
Free fraction calculator with step-by-step solutions. Add, subtract, multiply, and divide fractions. Automatic simplification and mixed number conversion.
Algebra Calculator
Free algebra calculator with step-by-step solutions. Solve linear equations, quadratic equations, simplify expressions, and systems of equations online.
Geometry Calculator
Free geometry calculator for 2D and 3D shapes. Calculate area, perimeter, volume, surface area for circles, triangles, rectangles, spheres, cubes, cylinders and more.