Area, volume and coordinate formulas with a worked number for each, every one recomputed in code. Lengths share one unit, areas use that unit squared and volumes that unit cubed. The value of π used is 3.14159….
Flat shapes
| Shape or idea | Formula | Example |
|---|---|---|
| Rectangle | A = w × h, P = 2(w + h) |
5 × 3: area 15, perimeter 16 |
| Triangle | A = ½ × b × h |
Base 6, height 4: 12 |
| Triangle from three sides (Heron) | s = (a + b + c) / 2, A = √(s(s − a)(s − b)(s − c)) |
Sides 7, 8, 9: 26.83 |
| Circle | A = πr², C = 2πr |
r = 5: area 78.54, circumference 31.42 |
| Trapezoid | A = (a + b) / 2 × h |
Parallel sides 4 and 10, height 5: 35.0 |
Try the Area Calculator, Circle Calculator and Triangle Calculator.
Solids
| Shape or idea | Formula | Example |
|---|---|---|
| Box | V = l·w·h, S = 2(lw + lh + wh) |
2 × 3 × 4: volume 24, surface 52 |
| Cylinder | V = πr²h, S = 2πr(r + h) |
r = 3, h = 10: volume 282.74, surface 245.04 |
| Cone | V = ⅓πr²h |
r = 3, h = 4: 37.7 |
| Sphere | V = 4/3·πr³, S = 4πr² |
r = 3: volume 113.1, surface 113.1 |
Try the Volume Calculator and Surface Area Calculator.
Triangles and coordinates
| Shape or idea | Formula | Example |
|---|---|---|
| Pythagorean theorem | a² + b² = c² |
Legs 3 and 4: hypotenuse 5 (also 5-12-13 and 8-15-17) |
| Sine, cosine, tangent | sin = opp/hyp, cos = adj/hyp, tan = opp/adj |
The angle opposite the side 4 in a 3-4-5 triangle: atan(4/3) = 53.13° |
| Distance between two points | d = √((x₂ − x₁)² + (y₂ − y₁)²) |
(1, 2) to (4, 6): 5 |
| Slope | m = (y₂ − y₁) / (x₂ − x₁) |
Same points: 1.333 |
| Midpoint | ((x₁ + x₂)/2, (y₁ + y₂)/2) |
(1, 2) and (4, 6): (2.5, 4) |
| Degrees and radians | rad = deg × π / 180 |
180° = π rad ≈ 3.1416; 90° = π/2 |
Try the Pythagorean Theorem Calculator, Right Triangle Calculator, Trigonometry Calculator, Distance Calculator, Slope Calculator, Vector Calculator and Coordinate System Converter.
Common mistakes
- Mixing units. Convert everything to one unit before multiplying: 2 m × 50 cm is 2 × 0.5 = 1 m², not 100.
- Diameter for radius. The formulas use the radius. Halve a diameter first.
- Calculator in the wrong angle mode.
sin(30)is 0.5 in degrees mode and about −0.988 in radians mode.