Pythagorean Theorem Calculator
Missing side, angles and area of a right triangle, with steps, triples and feet-and-inches input.
This triangle calculator is a full triangle solver: enter three known parts (SSS, SAS, ASA, AAS or SSA) and it finds every missing side and angle with the law of cosines or the law of sines , plus the area, perimeter, heights and medians.
Solved triangle
a = 5, b = 6, c = 7; A = 44.4153086°, B = 57.12165044°, C = 78.46304097°
Scalene acute triangle
The triangle has sides 5, 6 and 7 and angles 44.4153086°, 57.12165044° and 78.46304097°. It is scalene and acute, with area 14.69693846 and perimeter 18.
Angles are in degrees. Values are rounded to 10 significant digits.
| Part | Value | Source |
|---|---|---|
| Side a | 5 | Given |
| Side b | 6 | Given |
| Side c | 7 | Given |
| Angle A | 44.4153086° | Calculated |
| Angle B | 57.12165044° | Calculated |
| Angle C | 78.46304097° | Calculated |
Known: SSS
Given a = 5, b = 6, c = 7.
Law of cosines for angle A
Law of cosines for angle B
Angle sum for C
The angles of a triangle add up to 180°.
Area with Heron’s formula
The semiperimeter is s = (a + b + c)/2 = 9.
Check with ½ab sin C
Law of cosines
Plain-text formula: c^2 = a^2 + b^2 − 2ab cos C, cos C = (a^2 + b^2 − c^2)/(2ab)
Use it for SSS (to find an angle from three sides) and SAS (to find the third side). It reduces to the Pythagorean theorem when C = 90°, because cos 90° = 0.
Law of sines
Plain-text formula: a/(sin A) = b/(sin B) = c/(sin C) = 2R
Use it when you know a side and its opposite angle (ASA, AAS, SSA). The common ratio equals the diameter of the circumscribed circle.
Area of a triangle
Plain-text formula: K = (1/2)bh = (1/2)ab sin C = √(s(s − a)(s − b)(s − c)), s = (a + b + c)/2
Half the base times the height; or half of two sides times the sine of the angle between them; or Heron’s formula from the three sides. The calculator uses Heron and checks it with the sine form.
Heights, medians and radii
Plain-text formula: h_a = (2K)/a, m_a = (1/2)√(2b^2 + 2c^2 − a^2), r = K/s, R = a/(2 sin A)
Each height runs from a vertex perpendicular to the opposite side; each median runs to the midpoint of the opposite side. r is the radius of the inscribed circle and R of the circumscribed circle.
The result lists all six parts. The angles always add up to 180° (π radians), and the longest side is always opposite the largest angle, which is a quick check on your labeling.
The type combines sides (equilateral, isosceles or scalene) and angles (acute, right or obtuse). If the triangle has a 90° angle you can also use the Pythagorean theorem calculator, which finds a missing side from the other two and adds SOH-CAH-TOA steps.
Results are rounded to 10 significant digits. When you type rounded inputs, round the answers to the same precision; a side measured to 0.1 cm does not give an angle to a millionth of a degree.
To solve a triangle means to find all three sides and all three angles. You need three of the six parts, and at least one must be a side, because three angles fix only the shape, not the size. Which law to use depends on where the known angle sits.
Three sides (SSS). Find the largest angle first with the law of cosines, then a second angle the same way, then subtract from 180°. The worked example below solves sides 5, 6 and 7.
Two sides and the angle between them (SAS). Find the third side with the law of cosines, then an angle. For a = 8, b = 11 and C = 37°: , so c ≈ 6.666344593. Then A ≈ 46.23748662° and B = 180° − 37° − A ≈ 96.76251338°.
Two angles and a side (ASA or AAS). Subtract the two angles from 180° to get the third, then find each missing side with the law of sines. For A = 50°, B = 65° and c = 12: C = 65°, and .
Two sides and an angle not between them (SSA). Use the law of sines for the second angle, then check whether its supplement also fits; see the ambiguous case below.
| Case | What you know | First step | Number of triangles |
|---|---|---|---|
| SSS | Three sides | Law of cosines for an angle | One, if the triangle inequality holds |
| SAS | Two sides and the included angle | Law of cosines for the third side | One |
| ASA | Two angles and the side between them | Angle sum, then law of sines | One, if the angles total under 180° |
| AAS | Two angles and a side not between them | Angle sum, then law of sines | One, if the angles total under 180° |
| SSA | Two sides and an angle not between them | Law of sines for a second angle | None, one or two |
| AAA | Three angles only | Not solvable | Infinitely many similar triangles |
Knowing two sides and a non-included angle does not always fix the triangle. Picture side b and angle A fixed, and side a swinging from C like a compass: it can miss the base, touch it once or cross it twice. The deciding length is the height .
For a = 7, b = 10 and A = 40°, the height is 10 sin 40° ≈ 6.427876097. Side a = 7 is longer than the height but shorter than b, so it meets the base twice: B ≈ 66.67417652° with c ≈ 10.4321603, or B ≈ 113.3258235° with c ≈ 4.888728558. Both are valid, and the calculator lists both.
| Side a compared with h = b sin A and b | Triangles | Example with b = 10, A = 40° |
|---|---|---|
| a < h | None | a = 3 |
| a = h | One right triangle | a ≈ 6.427876097 |
| h < a < b | Two | a = 7 |
| a ≥ b | One | a = 12 |
The calculator returns the area whichever case you start from. If you know a base and its height, the area is simply half their product, . With two sides and the angle between them, use . With three sides, use Heron’s formula.
To find the height to a side, divide twice the area by that side: . For sides 5, 6 and 7 the area is 6√6 ≈ 14.69693846, so the height to side 7 is 2 × 14.69693846 / 7 ≈ 4.199125273. The perimeter is a + b + c, and half of it is the semiperimeter s used in Heron’s formula and in the inradius r = K/s.
Find the angles, area, heights and medians of a triangle with a = 5, b = 6 and c = 7.
Answer: A ≈ 44.42°, B ≈ 57.12°, C ≈ 78.46°, area 6√6 ≈ 14.69693846 and perimeter 18. The triangle is scalene and acute.
With two sides and the angle between them, use the law of cosines: c² = a² + b² − 2ab cos C. With a side, its opposite angle and one more angle, use the law of sines: b = a sin B / sin A. In a right triangle, the Pythagorean theorem a² + b² = c² is enough.
Subtract the two known angles from 180°. For angles of 50° and 65°, the third is 180° − 50° − 65° = 65°. If you know three sides instead, use the law of cosines for one angle at a time.
Because sin B = sin(180° − B). If side a can swing to meet the base at two points, both an acute and an obtuse angle B fit. For a = 7, b = 10 and A = 40°, B is about 66.7° or 113.3°.
Each side must be shorter than the sum of the other two. Sides 2, 3 and 6 fail because 2 + 3 < 6, and 2, 3 and 5 would only give a flat line.
Choose SSS and enter the three sides. The result gives the area by Heron’s formula and all three heights, h = 2 × area ÷ base. For sides 5, 6 and 7 the area is about 14.69693846 and the height to side 7 is about 4.199125273.
You do not need one. This page works in any phone browser, and you can add ScientifiCalc to your home screen so it opens with one tap like an app.
Yes. Switch the angle unit to radians and type a number or a multiple of π, such as pi/3. The results show each angle in radians with degrees in brackets. To convert one angle on its own, multiply by 180/π or use the DMS to decimal degrees converter.
Missing side, angles and area of a right triangle, with steps, triples and feet-and-inches input.
All six trig functions of an angle, or the angle from a ratio, with exact values, quadrant and steps.
DMS to decimal degrees and back for latitude and longitude, with N/S/E/W, DDM, radians and every step.
Polar ↔ rectangular (Cartesian) conversion with steps, quadrant reasoning, exact values and exponential form.
Type or tap expressions with exact fractions, memory, variables, constants and complex mode.
Convert between units in 40 categories with exact factors, formulas and tables.
Learn more: For the sine and cosine ratios behind these results, read how to use sin, cos and tan.
Results are calculated in your browser with methods checked by automated tests, and are intended for learning and general use. For engineering, medical, financial, legal or safety-critical decisions, verify important values independently and follow the rounding rules your work requires. How accurate are these results?