Perimeter Calculator
Pick a shape, enter its dimensions and get the perimeter in metres, feet and more. Add a price and piece length to estimate fencing, trim or framing.
Calculate
Result
The formula
Rectangle perimeter is 2(L + W). Square is 4 × side. Circle circumference is 2πr. Ellipse uses Ramanujan's approximation. Triangle is a + b + c. Parallelogram is 2(a + b). Trapezoid is a + b + c + d. Results convert with 1 ft = 0.3048 m exactly.
Worked example
- Rectangle 5 m × 4 m → 2(5+4) = 18 m
- Circle r = 2 m → 2π×2 ≈ 12.57 m
- Triangle 3 m, 4 m, 5 m → 3+4+5 = 12 m
Result: Shape formulas with multi-unit display and optional fencing estimate
How multi-shape perimeter is calculated
Each mode applies the standard perimeter formula for that shape. Dimensions are converted to metres for calculation, then shown in your chosen length unit and common conversions.
Rectangles, squares, and circles
A rectangle perimeter is 2 times (length plus width). A square is 4 times the side length since all sides are equal. A circle uses circumference C = 2πr. An ellipse uses Ramanujan's first approximation for more accuracy than simpler formulas.
Triangles, parallelograms, and trapezoids
Triangle perimeter is the sum of all three sides (a + b + c). A parallelogram has opposite sides equal, so perimeter is 2(a + b). A trapezoid has four sides; perimeter is the sum of all four (a + b + c + d).
Units and fencing
Choose a length unit for all dimensions. Values convert to metres internally (1 ft = 0.3048 m exactly). Optional piece length, price per unit length, and waste % estimate how many pieces to buy and the material cost for fencing, trim, or framing.
What we do not model
No border overlap, corner radius smoothing, or GIS survey feet. For legal property perimeter, use a surveyor's plan.
Interesting facts
π is irrational
Circle and ellipse perimeter use Math.PI (≈ 3.141592653589793). Display rounds; engineering tolerances may need more digits.
Ellipse circumference is complex
No simple closed formula exists; this calculator uses Ramanujan's first approximation: π(a+b)[1 + 3h/(10+√(4−3h))] where h = (a−b)²/(a+b)².
Triangle inequality matters
Three sides can only form a triangle if the sum of any two sides exceeds the third. Sides 1, 2, 5 cannot close.
m ↔ ft
1 m ≈ 3.28084 ft using the international foot (0.3048 m exactly).
Composite perimeter
For L-shaped or irregular boundaries, break them into segments, sum each segment, and add shared edges as needed.
Frequently asked questions
Choose Circle, enter the radius, and calculate. Circumference = 2πr. If you know diameter, enter diameter ÷ 2 as the radius.
Perimeter = 2 × (length + width). For a 5 m × 4 m rectangle, P = 2×(5+4) = 18 m.
Add all three sides: P = a + b + c. For sides 3 m, 4 m, 5 m, perimeter = 12 m.
No — pick one length unit so all inputs share it. Convert lengths first with the unit converter if needed.
Choose Ellipse and enter the semi-major axis (a) and semi-minor axis (b). The calculator uses Ramanujan's approximation since no simple formula exists.
Open Estimate fencing or trim, enter the length of each piece, price per unit length, and a waste percentage (default 5%). The tool scales perimeter by (1 + waste) then estimates pieces and cost.
Break it into segments (rectangles, lines), calculate each perimeter segment, and add them. Subtract any internal edges if they don't form part of the outer boundary.
Perimeter = 4 × side = 4 × 5 = 20 m. A square is a special rectangle with all sides equal.
References
- SI units — metre SI length basis for perimeter units.
- International foot International foot = 0.3048 m exactly.
- Ramanujan's ellipse approximation Accurate approximation for ellipse circumference when simpler formulas don't suffice.