Rectangle 8 × 5 cm
- Shape
- Rectangle
- Length
- 8 cm
- Width
- 5 cm
- Show results in
- Centimetres (cm)
- Area
- 40 cm²
- Perimeter
- 26 cm
- Diagonal
- 9.433981 cm
Checked against: 8 × 5, 2(8 + 5); Python 3.8 math.sqrt(89)
Area and perimeter of 15 plane shapes, from rectangles, triangles and trapezoids to circles, ellipses, regular polygons and rings, drawn to scale.
The rectangle covers 40 cm² and its boundary is 26 cm long.
Choose one of 15 plane shapes and enter the dimensions that define it. The area and perimeter come back with the other lengths that shape has: diagonals, heights, arc and chord lengths, a regular polygon's apothem and circumradius, or a ring's width. A triangle from three sides uses Heron's formula, A = √(s(s − a)(s − b)(s − c)) with s half the perimeter, and a regular polygon uses A = ns²/(4 tan(180°/n)).
The default rectangle, 8 cm by 5 cm, has an area of 40 cm², a perimeter of 26 cm and a diagonal of 9.434 cm. Area sizes flooring, turf and paint; perimeter sizes fencing, edging and skirting board. The drawing is to scale, so a mistyped dimension shows up as the wrong shape.
Base and height do not fix a triangle's slanted sides, and a trapezoid needs its legs, so those two inputs give area only. An ellipse's perimeter has no closed form; Ramanujan's second approximation is used, accurate to 0.04% or better.
Checked against: 8 × 5, 2(8 + 5); Python 3.8 math.sqrt(89)
Checked against: Right triangle with legs 3 and 4: ½·3·4 = 6; height onto side 3 is the other leg, 4
Checked against: Python 3.8 math: 6*4/(4*tan(pi/6)) = 6√3, 2/(2*tan(pi/6)) = √3; a hexagon's circumradius equals its side
Checked against: Square of side 3: area 9, apothem 3/2; Python 3.8 math: 3/sqrt(2)
Average the two parallel sides and multiply by the perpendicular height: A = (a + b)/2 × h. Bases of 10 cm and 4 cm with a height of 4 cm give 7 × 4 = 28 cm². British English calls this shape a trapezium; the formula is the same. The perimeter also needs the two slanted legs: legs of 5 cm each make it 24 cm.
Use Heron's formula. Take the semi-perimeter s = (a + b + c)/2, then A = √(s(s − a)(s − b)(s − c)). Sides of 5, 6 and 7 cm give s = 9 and A = √(9 × 4 × 3 × 2) = √216 ≈ 14.697 cm². Three lengths only make a triangle if each is shorter than the other two combined, so 3, 4 and 8 have no area.
A = (3√3/2)s², about 2.598 times the side squared. A hexagon with 5 cm sides covers 64.952 cm², and one with 2 m sides covers 10.392 m². Any regular polygon with n sides of length s has A = ns²/(4 tan(180°/n)). A hexagon's circumradius equals its side, and its apothem is s√3/2 ≈ 0.866s.
Not an exact one in elementary functions: the exact perimeter is a complete elliptic integral. Ramanujan's 1914 approximation, P ≈ π(a + b)(1 + 3h/(10 + √(4 − 3h))) with h = (a − b)²/(a + b)², is off by at most 0.04%, reached only as the ellipse flattens into a line. For semi-axes of 10 and 6 it gives 51.0539977, within 1.2 × 10⁻⁹ of the exact value.
Multiply by 0.09290304, the square of the international foot (0.3048 m exactly, fixed in 1959). One square metre is about 10.764 ft². A 12 ft × 10 ft room is 120 ft², or 11.148 m². Area scales with the square of the length unit, so converting each side first and then multiplying gives the same result.
Accuracy depends on your inputs and the method's assumptions. Decimal arithmetic uses 50 significant digits, but estimates, numerical methods and source data can be less precise; the displayed rounding does not remove those limits. It is checked against 16 worked examples whose answers come from independent sources; for example, “Rectangle 8 × 5 cm” is checked against 8 × 5, 2(8 + 5); Python 3.8 math.sqrt(89).
Weisstein, E. W. “Heron's Formula”, “Regular Polygon”, “Ellipse” — MathWorld; Ramanujan, S. (1914) “Modular equations and approximations to π”, Quarterly Journal of Mathematics 45, 350–372 (perimeter approximation II); NIST Handbook 44, Appendix C — exact inch–centimetre relation (1 in = 2.54 cm).
16 worked examples with independently sourced answers ship with this calculator. They run in the test suite; you can run them here too.
Area, circumference, radius and diameter of a circle from any one of them, plus arc length, chord, sector and segment area for a central angle.
Missing sides, angles, area, perimeter, heights, inradius and circumradius of any triangle from three measurements, with both SSA answers.
Sum of interior angles, each interior and exterior angle of a regular polygon and the number of diagonals, from the number of sides or one angle.
Area, perimeter and centroid of any simple polygon from its vertex coordinates, using the shoelace (surveyor's) formula with every term shown.
Volume, surface area, slant height and capacity in litres for 14 solids, including cylinders, cones, spheres, pyramids, prisms, tori and ellipsoids.
Allow optional Google Analytics to measure page visits? Calculators work either way. Privacy and choices
Optional analytics: off.