Perimeter calculator
Pick a shape and enter its dimensions. Area is shown alongside wherever the shape allows it.
Free · no signup Runs in your browser
Separate with commas or spaces.
How do you calculate perimeter?
Add up the lengths of every side. For a rectangle that is 2 × (length + width); for a triangle it is simply the three sides added; for a circle the perimeter is called the circumference and equals 2πr. Perimeter is a distance measured in units of length, while area is measured in square units.
Perimeter and area are not the same kind of number
They are measured in different units and behave differently, and confusing them is the single most common error this page exists to prevent.
Perimeter is a length, measured in centimetres or metres. Area is a two-dimensional quantity, measured in square centimetres or square metres. Two shapes can share a perimeter and enclose wildly different areas: a 1 × 9 rectangle and a 5 × 5 square both have a perimeter of 20, but the square encloses 25 square units against the rectangle's 9.
That is why the calculator shows both together wherever it can. Of all shapes with a given perimeter, the circle encloses the most area — which is why bubbles are round.
The formulas
Perimeter is always a sum of side lengths, however the shape dresses it up.
rectangle P = 2(l + w) A = l·wsquare P = 4a A = a²triangle P = a + b + c A = √[s(s−a)(s−b)(s−c)]where s = P/2circle P = 2πr A = πr²parallelogram P = 2(a + b)trapezoid P = a + b + c + dellipse P ≈ Ramanujan approximationirregular P = sum of all sides
Heron's formula is the useful one for triangles, because it finds the area from the three sides alone with no angle and no height required. The semi-perimeter s is simply half the perimeter, which the calculator has already worked out.
The ellipse is the odd one out: its perimeter has no exact closed form. This calculator uses Ramanujan's second approximation, which is accurate to better than one part in a billion for any ellipse you are likely to measure.
Worked example: a triangle with sides 5, 6 and 7
Finding both perimeter and area from the three side lengths alone.
- Perimeter = 5 + 6 + 718
- Semi-perimeter s = 18 ÷ 29
- s(s−a)(s−b)(s−c) = 9 × 4 × 3 × 2216
- Area = √21614.697
Perimeter 18 units, area 14.697 square units.
No angle and no height were needed. Note also that 5 + 6 > 7, so the triangle is valid — if any one side were longer than the other two combined, no triangle could exist.
Practical uses
- Fencing, skirting and trim are priced by perimeter
- Paint, flooring and turf are priced by area
- Framing a picture needs perimeter; the glass needs area
- Garden edging is perimeter; topsoil is area times depth
- Irregular sites are usually measured as a chain of side lengths, which is the irregular mode
The practical rule of thumb: if you buy it by the metre it is perimeter, and if you buy it by the square metre it is area.
Assumptions and limits
- Area is not shown for parallelograms and trapezoids, which need a perpendicular height rather than a slant side
- Irregular polygons give perimeter only — area needs coordinates or angles, not side lengths
- The triangle mode checks validity and says so when the sides cannot form a triangle
- The ellipse perimeter is an approximation, though an extremely accurate one
Common questions
What is the difference between perimeter and area?
Perimeter is the distance around the outside, measured in units of length. Area is the space enclosed, measured in square units. Two shapes with identical perimeters can enclose very different areas — a 5 × 5 square encloses 25 square units where a 1 × 9 rectangle with the same perimeter encloses only 9.
What is the perimeter of a circle called?
The circumference. It equals 2πr, or equivalently πd where d is the diameter. It is the same concept as perimeter, just with a specific name for the circular case.
How do I find the area of a triangle from its sides?
Use Heron's formula. Take the semi-perimeter s, which is half the perimeter, then the area is the square root of s(s−a)(s−b)(s−c). No angle or height is needed, which makes it the practical choice for surveyed or measured triangles.
Can I find the area of an irregular polygon from its sides?
No. Side lengths alone do not determine the shape — a four-bar linkage with fixed sides can flex into many different areas. You need coordinates or angles as well, which is why the irregular mode reports perimeter only.
Why is the ellipse perimeter only approximate?
Because it has no exact closed-form expression; the exact value requires an elliptic integral. Ramanujan's second approximation, used here, is accurate to better than one part in a billion for ordinary shapes.
Where these numbers come from
- Wolfram MathWorld — Perimeter Definitions and formulas for standard shapes.
- Wolfram MathWorld — Heron's formula Triangle area from three side lengths.
Last verified 2026-08-01 The method on this page is checked against the sources above at least once a year. Spotted something out of date? Tell us and we will fix it.
Related calculators
Octagon calculator
Area, perimeter and both widths — plus the corner setback for cutting one from a square.
Open calculatorMoment of inertia
Second moment of area for beams and sections, with section modulus and radius of gyration.
Open calculatorReverse percentage
Find the original number before a percentage increase or decrease was applied.
Open calculatorpH calculator
Convert between pH, pOH and hydrogen or hydroxide ion concentration.
Open calculatorArea calculator
Find the area of a rectangle, triangle, circle, ellipse, trapezoid, sector, ring or regular polygon, in any unit, with conversions to m², ft², acres and hectares.
Open toolCubic yards
Concrete, soil and gravel volume in cubic yards and cubic metres — the two units Canadian suppliers actually use.
Open calculator🧮 Maths and science calculators
Homework tools that explain the method rather than just handing over an answer.
See all 30 calculators in this section