Area and Volume Calculator: Perimeter and Surface Area
By HesaplayıcıHow we calculate
The area and volume calculator computes area and perimeter for plane shapes, and volume and total surface area for 3D solids, from their dimensions. Choose a shape and a common length unit, enter your measurements alongside the schematic diagram, and inspect each result together with its step-by-step formula.
Worked example: A square with 12 m sides
Area
144 m²
- Perimeter
- 48 m
Step by step
Area
A = a²
12² = 144 m²
Perimeter
P = 4a
4 × 12 = 48 m
Required inputs by shape
The SVG schematic inside the calculator matches each dimension letter to its input field (not drawn to scale). Enter every dimension in the same unit (m, cm, mm, km, in, ft or yd):
- Square and cube: A single side length (
a). - Rectangle and rectangular box: Length and width (
a,b), plus height (h) for a box. - Circle, sphere, cylinder and cone: Radius (
r), plus perpendicular height (h) for cylinders and cones. - Triangle and right triangle: Three side lengths (
a,b,c) for a general triangle, or two perpendicular legs (a,b) in right-triangle mode where Pythagoras finds the hypotenuse. - Parallelogram and ellipse: Base (
b), sloping side (s) and perpendicular height (h) for a parallelogram; two semi-axes (a,b, half the full axes) for an ellipse. - Trapezoid: Lower base (
b), upper base (t), perpendicular height (h) and horizontal offset (d, horizontal distance from lower-left to upper-left corner; enter(b − t) / 2to center the upper base).
Formula table
A is area, P perimeter, V volume and S total surface area (π uses Math.PI):
| Shape | Area or volume | Perimeter or total surface area |
|---|---|---|
| Square | A = a² | P = 4a |
| Rectangle | A = ab | P = 2(a + b) |
| Triangle (Heron) | s = (a + b + c) / 2, A = √(s(s − a)(s − b)(s − c)) | P = a + b + c |
| Right triangle | A = ab / 2 | c = √(a² + b²), P = a + b + c |
| Circle | A = πr² | P = 2πr |
| Parallelogram | A = bh | P = 2(b + s) |
| Trapezoid | A = (b + t)h / 2 | P = b + t + left side + right side |
| Ellipse | A = πab (semi-axes) | P ≈ π(a + b)(1 + 3q / (10 + √(4 − 3q))) |
| Cube | V = a³ | S = 6a² |
| Rectangular box | V = abh | S = 2(ab + ah + bh) |
| Right circular cylinder | V = πr²h | S = 2πr(r + h) |
| Right circular cone | V = πr²h / 3 | S = πr(r + l), l = √(r² + h²) |
| Sphere | V = 4πr³ / 3 | S = 4πr² |
For a trapezoid, left side = √(h² + d²) and right side = √(h² + (d + t − b)²). The ellipse perimeter approximation uses q = ((a − b) / (a + b))². For needle-like triangles, Kahan’s stabilized Heron rearrangement prevents floating-point cancellation error.
Worked examples
- Square (
a = 12 m): Area12² = 144 m², perimeter4 × 12 = 48 m. - Isosceles trapezoid (
b = 10 cm,t = 6 cm,h = 4 cm,d = 2 cm): Area(10 + 6) × 4 / 2 = 32 cm²; each sloping side is√(4² + 2²) = √20 ≈ 4.472 cm, giving perimeter10 + 6 + 8.944 ≈ 24.94 cm. - Right circular cylinder (
r = 3 cm,h = 10 cm): Volumeπ × 3² × 10 ≈ 282.74 cm³, total surface area2π × 3 × (3 + 10) ≈ 245.04 cm².
Limits and unit conversion
All lengths must be positive between 10⁻⁹ and 10⁹ (trapezoid offset may be from −10⁹ to 10⁹). Triangle side lengths must satisfy the triangle inequality, and parallelogram height cannot exceed its sloping side; composite shapes and structural engineering checks are outside scope. Convert mixed input units first with the length converter, convert calculated areas to acres or square feet with the area converter, or convert solid volumes to liters or gallons with the volume converter.
Frequently Asked Questions
How do linear, area and volume units differ?
Perimeter is a 1D boundary length (m, cm), area is a 2D surface (m², cm²) and volume is 3D space (m³, cm³). Enter all dimensions in the same length unit and the calculator labels every output unit automatically.
What is the trapezoid horizontal offset used for?
It measures the horizontal shift from the lower-left vertex to the upper-left vertex (positive right, negative left), which is needed to compute the two sloping side lengths for perimeter. Zero aligns the left ends; enter (lower base − upper base) / 2 for a symmetric isosceles trapezoid.
Why is ellipse perimeter marked as approximate?
An ellipse has no closed-form elementary formula for perimeter. The tool applies Ramanujan’s accurate second approximation and flags it as approximate, while ellipse area (πab) is exact.
Does surface area include the circular bases of a cylinder or cone?
Yes. Total surface area includes both bases of a right circular cylinder and the single base of a right circular cone; oblique solids are not supported.
Does switching the length unit convert the numbers I already typed?
No. The unit selector declares the unit of your inputs. Convert mixed measurements to one unit first with the length converter.
Calculation rules
- Enter every length in the same selected unit. Perimeter uses that unit, area and surface area its square, and volume its cube. Changing the unit relabels the numbers; it does not convert them.
- Lengths must be from 10⁻⁹ to 10⁹. Trapezoid horizontal offset is from −10⁹ to 10⁹. A triangle uses three sides; a right triangle uses two perpendicular legs. Degenerate shapes are rejected.
- The trapezoid offset locates the upper base; default 0 aligns the left ends and does not assume an isosceles trapezoid. Parallelogram height cannot exceed its sloping side.
- Ellipse inputs are semi-axes. Area is πab; perimeter is Ramanujan’s second approximation, with greater approximation error for very flat ellipses. π is Math.PI. Results are not rounded during calculation.
- Cylinders and cones are right and circular. Total surface area includes the bases. Reading dimensions from drawings, composite shapes and structural design are outside scope.