Math
Perimeter Calculator
Pick a shape and enter its side lengths to get the perimeter — the total distance around the outside.
The calculator shows the formula it used and the substituted numbers, keeps circles exact in terms of π, and states clearly that the ellipse result is Ramanujan's approximation.
The perimeter is a length, so it uses this unit directly.
Longer side.
Shorter side.
Try an example
Result
Perimeter
—
- Perimeter with units
- —
- Formula
- —
- Note
- —
Student quick launch
Grade planning, algebra checks, and formulas students reach for most.
Study path
Use this calculator with
Follow these when you want the formula behind the answer, a short lesson, or nearby tools in the same topic.
What the perimeter calculator solves
Pick a shape and enter its side lengths to get the perimeter — the total distance around the outside. The calculator shows the formula it used and the substituted numbers, keeps circles exact in terms of π, and states clearly that the ellipse result is Ramanujan's approximation.
Formula
How to use it
- Select the shape.
- Enter every side length (or the radius / semi-axes) in one unit and pick that unit.
- Read the perimeter and the substitution line to see the numbers that were added.
How to read the answer
Perimeter is the total length of the boundary, so it is measured in the same unit as the sides. For a circle it is the circumference and is shown exactly in terms of π; for an ellipse only an approximation is possible, and the calculator labels it as such.
Common mistakes and edge cases
- Adding only two sides of a rectangle — the formula doubles the sum because there are four sides.
- A triangle needs all three sides; base and height alone are not enough for perimeter (they are for area).
- Three lengths that break the triangle inequality (1, 2, 3) cannot be a triangle and are rejected.
- For an ellipse enter the semi-axes (half-widths), not the full widths.
- Perimeter never uses square units; if the question wants square units it is asking for area.
Worked examples
Rectangle 12 by 8
Perimeter
40
Triangle 5, 7, 9
Perimeter
21
Circle radius 5 (10π)
Perimeter
31.4159
Regular octagon side 7
Perimeter
56
Ellipse a = 6, b = 4 (Ramanujan)
Perimeter
31.7309
Decimal square side 2.75
Perimeter
11
Impossible triangle 1, 2, 3
Perimeter
Error
Frequently asked questions
What is the perimeter formula for a rectangle?+
P = 2(l + w): add the length and width, then double it because each appears twice. A 12 by 8 rectangle has perimeter 2(20) = 40.
How do I find the perimeter of a triangle?+
Add the three sides: P = a + b + c. If you only know two sides and an angle, find the third with the law of cosines first.
Is there an exact formula for the perimeter of an ellipse?+
No — it needs an infinite series (an elliptic integral). Ramanujan's approximation π(a + b)[1 + 3h/(10 + sqrt(4 − 3h))] is accurate to better than 0.01% and is what this page uses.
What is the perimeter of a circle called?+
Circumference. It equals 2πr or πd, and this calculator shows it exactly in terms of π.
What is the perimeter of a regular polygon?+
Number of sides times side length: P = n·s. A regular hexagon with side 7 has perimeter 42.
Can perimeter be found from area?+
Only for shapes fixed by one number — a square (side = sqrt(A)) or a circle (r = sqrt(A/π)). A rectangle with area 60 can have many different perimeters.
About this calculator
- Written by
- mathcheck editorial team
- Last reviewed
- September 4, 2026
Method
- Uses the values entered by the user and stable formulas documented on the page.
Related calculators
Area Calculator
Find the area of 11 shapes — rectangle, square, triangle (base-height, three sides, or SAS), circle, trapezoid, parallelogram, rhombus, ellipse, regular polygon, sector, and kite — with the formula, substitution, square-unit labels, and a diagram.
Circumference Calculator
Find the circumference of a circle from its radius, diameter, or area. Shows the exact answer in terms of π (like 12π), the decimal, the radius and diameter, and every step.
Rectangle Calculator
Enter any two rectangle properties — length, width, diagonal, area, or perimeter — and get all five, plus the diagonal angle, with exact radicals for the diagonal and the steps used to solve.
Square Calculator
Enter one square measurement — side, diagonal, area, or perimeter — and get all of them with the diagonal in exact radical form (s√2), plus the inscribed and circumscribed circle radii.
Hexagon Calculator
Regular hexagon calculator: enter the side, apothem, circumradius, area, or perimeter to get everything else, with the exact area (3√3/2)s² as a radical, interior angles, and the number of diagonals.
Triangle Calculator
Solve any triangle from SSS, SAS, ASA, AAS, or SSA. Get all sides and angles, area, perimeter, heights, medians, inradius, circumradius, classification, a scale drawing, and both solutions in the ambiguous case.
Last updated: September 4, 2026