Perimeter Calculator
Distance around a rectangle, square, triangle, circle, polygon or trapezoid
Last updated October 2026
Method: Standard geometry formulas: rectangle 2(L+W), square 4s, triangle a+b+c, circle 2πr or πd, regular polygon n×s, trapezoid a+b+c+d. The triangle and trapezoid options check that the sides can actually close into that shape, and π is used at full precision. Feet, inches, yards and miles convert with the exact NIST factors (1 ft = 0.3048 m).
Included: Six common shapes, a circle from its radius or its diameter, the formula and step-by-step working, the perimeter (or circumference) in your unit and in feet or meters, and the area wherever the inputs fix it.
Not included: Irregular polygons with more than four sides, ellipses and other curves, 3D objects, and mixed units within one shape (convert feet and inches to one unit first).
⬜ Choose a shape
P = 2 × (L + W)📏 Perimeter
🧮 Step by step
π is taken as 3.141593…. Results are rounded for display; calculations use full precision.
Perimeter calculator: everything you need to know
The perimeter is the total distance around the edge of a flat shape. For a rectangle, use P = 2 × (L + W): an 8 m by 5 m yard has a perimeter of 2 × (8 + 5) = 26 m (about 85.3 ft). This perimeter calculator does the same for six shapes (rectangle, square, triangle, circle, regular polygon and trapezoid) and shows the exact formula and every step of the arithmetic.
For the space inside a shape, use the Area Calculator; for every property of one shape, the Circle Calculator, Triangle Calculator and Trapezoid Calculator go deeper. When the perimeter is a shopping list, the Fence Calculator turns a boundary into posts and rails and the Linear Feet Calculator adds up running lengths of trim or lumber.
The perimeter formulas for every shape
Each shape has its own formula, but they all come down to "add up the boundary." Here are the ones this tool uses:
Rectangle: P = 2 × (L + W) Square: P = 4 × s Triangle: P = a + b + c Circle: C = 2 × π × r Polygon: P = n × s (regular, n sides) Trapezoid: P = a + b + c + d Here L and W are the rectangle's length and width, s is a side length, r is the circle's radius (or d its diameter, with C = πd), and n is the number of equal sides on a regular polygon. In the trapezoid, a and c are the parallel sides and b and d the legs. The circle result is properly called the circumference, but it measures the same thing as a perimeter: the distance around.
What perimeter actually means
Perimeter is a one-dimensional length. Unlike area, which fills the inside of a shape and is measured in square units, perimeter only follows the outline, so it is measured in plain linear units such as feet, meters and inches. The word comes from the Greek peri ("around") and metron ("measure"). If your answer ever ends up in square units, you have accidentally calculated area instead.
How to use this perimeter calculator
You can get an answer in seconds:
- Pick a shape: tap rectangle, square, triangle, circle, regular polygon or trapezoid. The matching formula appears immediately, and each shape opens with sample values from the examples on this page that you can overwrite.
- Enter the dimensions: type each measurement the shape needs. For a rectangle that is length and width; for a circle, the radius or (after tapping "I know the diameter") the diameter; for a regular polygon, the number of sides and one side length; for a trapezoid, the two parallel sides and the two legs.
- Choose the unit you measured in: every dimension must use that unit. The result also shows the same perimeter in feet or meters (inches or centimeters for small units, miles or kilometers for large ones).
- Read the result: the large number at the top is the perimeter (or circumference). The step-by-step card shows exactly how it was calculated, and the area appears wherever the inputs fix it.
The result updates instantly as you type, so you can experiment: double a side and watch the perimeter respond.
Worked example 1: a rectangle
Suppose a garden bed is 8 m by 5 m. Add the two different sides first: 8 + 5 = 13. Then double, because there are two of each: 2 × 13 = 26 m, or about 85.3 ft. If you were edging it with brick, you would buy 26 m of edging (plus a little extra for cuts). Notice the area of the same bed is 8 × 5 = 40 m², a square-unit measurement and a completely different quantity from the perimeter.
Perimeter of a rectangle chart (length × width)
Every value below is 2 × (L + W). Read down to your length and across to your width; the cell is the perimeter in the unit you measured in.
| Length ↓ / Width → | 4 | 6 | 8 | 10 | 12 |
|---|---|---|---|---|---|
| 6 | 20 | 24 | 28 | 32 | 36 |
| 8 | 24 | 28 | 32 | 36 | 40 |
| 10 | 28 | 32 | 36 | 40 | 44 |
| 12 | 32 | 36 | 40 | 44 | 48 |
| 15 | 38 | 42 | 46 | 50 | 54 |
| 20 | 48 | 52 | 56 | 60 | 64 |
Worked example 2: a circle
A circular patio has a radius of 7 ft. The circumference is C = 2 × π × r = 2 × 3.14159 × 7 = about 43.98 ft. If you only knew the diameter (14 ft), you would get the same answer with C = π × d = 3.14159 × 14; in the calculator, tap "I know the diameter" and enter 14. That circumference tells you how much edging or coping you need to run around the patio's rim.
Circle circumference by radius and diameter
Circumference is a circle's perimeter, C = 2πr. The diameter column is just 2 × the radius, so you can look up either measurement.
| Radius (r) | Diameter (d) | Circumference (2πr) |
|---|---|---|
| 1 | 2 | 6.28 |
| 2 | 4 | 12.57 |
| 3 | 6 | 18.85 |
| 5 | 10 | 31.42 |
| 7 | 14 | 43.98 |
| 10 | 20 | 62.83 |
| 12 | 24 | 75.40 |
| 15 | 30 | 94.25 |
| 20 | 40 | 125.66 |
| 25 | 50 | 157.08 |
Worked example 3: a regular hexagon
A regular hexagon has 6 equal sides. If each side is 4 in, the perimeter is simply n × s = 6 × 4 = 24 in. The same logic scales to any regular polygon: a regular pentagon (5 sides) with 10 cm sides has a perimeter of 5 × 10 = 50 cm. Because all sides are equal, you never have to measure more than one.
Quick reference table
These ready-made results assume the dimensions shown; swap in your own numbers above for an exact answer.
| Shape | Formula | Example | Perimeter |
|---|---|---|---|
| Square | 4s | s = 6 | 24 |
| Rectangle | 2(L+W) | 8 × 5 | 26 |
| Triangle (equilateral) | a+b+c | 5, 5, 5 | 15 |
| Circle | 2πr | r = 7 | 43.98 |
| Pentagon (regular) | n×s | 5 × 10 | 50 |
| Hexagon (regular) | n×s | 6 × 4 | 24 |
| Trapezoid | a+b+c+d | 5,4,3,4 | 16 |
Who this calculator is for
Anyone who needs the distance around a shape, including:
- Students and teachers checking geometry homework or showing the working step by step.
- DIY and home projects: measuring fencing, baseboard, picture-frame trim, garden edging or ribbon.
- Crafters and sewers figuring out binding, piping or border length.
- Landscapers and contractors estimating curbing or perimeter materials before a job.
- Anyone who wants a quick, transparent answer with the formula spelled out.
Key terms explained
- Perimeter: the total length of the boundary of a flat shape.
- Circumference: the perimeter of a circle, found with 2πr.
- Radius (r): the distance from the center of a circle to its edge, half the diameter.
- Diameter (d): the distance straight across a circle through the center; d = 2r.
- Regular polygon: a many-sided shape whose sides (and angles) are all equal, so P = n × s.
- Side (s): one straight edge of a shape; for squares and regular polygons every side is the same.
Perimeter vs. area: don't mix them up
Perimeter and area answer different questions. Perimeter is how far it is around the edge (a length, in feet or meters). Area is how much surface fits inside (in square feet or square meters). You use perimeter for fencing, framing and edging; you use area for paint, flooring, sod and turf. Two shapes can share the same area but have wildly different perimeters: a long, thin rectangle has a much bigger perimeter than a square of the same area. When your project needs the inside surface rather than the boundary, switch over to the Area Calculator; it covers the same shapes in square units.
From a rectangle's perimeter to its missing side and area
A classic homework question gives the perimeter and one side and asks for the other side or the area. The trick: half the perimeter equals length + width, so subtract the side you know to find the side you don't, then multiply for the area. Every row below is worked with P ÷ 2 − known side.
| Perimeter | Known side | Half (P÷2) | Other side | Area |
|---|---|---|---|---|
| 50 | 15 | 25 | 10 | 150 |
| 40 | 12 | 20 | 8 | 96 |
| 30 | 8 | 15 | 7 | 56 |
| 24 | 7 | 12 | 5 | 35 |
| 60 | 20 | 30 | 10 | 200 |
| 100 | 30 | 50 | 20 | 600 |
Worked in full for the first row: a rectangular garden with a 50 m perimeter and a 15 m length has a width of 25 − 15 = 10 m, so its area is 15 × 10 = 150 m².
Tips for accurate results
- Use one unit: convert all measurements to the same unit (all feet, or all inches) before entering them.
- Radius vs. diameter: if you measured straight across the circle, tap "I know the diameter" instead of halving the number yourself.
- Measure the outside edge only: for composite shapes, ignore interior lines and trace just the outer boundary.
- Add a waste allowance: for real-world materials, buy a little more than the exact perimeter to cover cuts and overlaps.
- Regular vs. irregular: n × s only works when every side is equal; otherwise add each side by hand.
Related concepts and calculators
Perimeter sits alongside a family of geometry and math tools. To find the surface inside a shape instead of around it, use the Area Calculator. For a circle on its own (circumference, area, radius and diameter all in one place) the Circle Calculator is the dedicated tool, and for triangle-specific work such as angles the Triangle Calculator goes further than the perimeter sum here. For a curved edge that is only part of a circle, the Arc Length Calculator gives the length of the arc. Working backward from a circle's area to its radius takes a square root, r = √(A ÷ π), which the Square Root Calculator handles, and when you scale a plan up or down the Scale Calculator converts the drawing's lengths. For polygons with unequal sides, simply sum the sides yourself: the same add-everything principle this calculator uses for triangles and trapezoids.
Real-world projects that need a perimeter
Perimeter is one of those numbers that shows up the moment you start buying materials by the running foot or meter. A few common jobs and how the figure is used:
- Fencing a yard: the perimeter is the starting point for the length of fence you need. Measure the boundary, subtract the gate openings, and allow a little extra for cuts; the Fence Calculator then turns that length into posts, rails and panels. A square-ish lot fences cheaper than a long, narrow one of the same area.
- Baseboard, crown molding and trim: the perimeter of a room (minus doorways) tells you how many feet of molding to buy. Trim is sold in fixed lengths, so round up to whole boards and allow extra for mitered corners.
- Picture frames and matting: the perimeter of the artwork sets the length of frame stock; each of the four corners is cut at 45 degrees, so a little overage prevents a short final piece.
- Garden edging and curbing: brick, steel or plastic edging is priced per foot, so the bed's perimeter is your shopping list. Curved beds are easier to estimate as a circle or part-circle circumference.
- Sewing, quilting and upholstery: binding, piping and border trim all run around the edge, so the perimeter of the panel plus a seam allowance is the length to cut.
- Pools and patios: coping, tile bands and safety fencing all follow the perimeter, while the water surface or paving needs area instead.
In every case the boundary length is the cost driver, which is why a quick, transparent perimeter is worth more than it looks: a 5% miscalculation on a long fence line can be a costly extra trip to the supplier.
Composite and irregular shapes
Most real rooms, yards and parcels are not perfect rectangles; they are composite shapes made of several rectangles, or irregular outlines with sides of different lengths. The good news is that the rule never changes: the perimeter is still just the total of the outside edges. To handle an L-shaped room, for example, walk the outline and write down every wall length in order, then add them all. Do not add the interior step where the two rectangles meet on the inside; only the outer boundary counts. A reliable method is to label the corners, list each side once as you travel around, and check that you finish back where you started. For a shape that mixes straight and curved edges, measure the straight parts directly and treat each curved part as a fraction of a circle's circumference (a quarter-round corner is one-quarter of 2πr). Because there is no single formula for an irregular outline, careful measurement beats any shortcut, and a sketch with every side labeled is the best defense against double-counting or skipping an edge.
Limitations and assumptions
- The polygon formula assumes a regular polygon (all sides equal). For irregular polygons, add each side individually.
- The trapezoid option takes all four side lengths, with a and c as the parallel sides; it does not derive a missing slanted side from the parallel sides and height. Its area comes from the four sides, which is not possible when a and c are equal (a parallelogram).
- It works in two dimensions only; it does not compute the surface perimeter of 3D objects.
- All inputs must be in the same unit. The result is converted to feet or meters for you, but feet mixed with inches inside one shape is not.
Sources
- Common Core State Standards for Mathematics: Grade 3 Measurement and Data, 3.MD.D.8 (perimeters of polygons, including an unknown side) and Grade 7 Geometry, 7.G.B.4 (the circumference of a circle).
- NIST Digital Library of Mathematical Functions, §3.12 Mathematical Constants: π as the ratio of a circle's circumference to its diameter, 3.14159 26535 89793…
- Euclid's Elements, Book I, Proposition 20: in any triangle the sum of any two sides is greater than the remaining one (the triangle inequality the calculator checks).
- NIST Special Publication 811, Appendix B.8 conversion factors: 1 ft = 0.3048 m, 1 in = 0.0254 m, 1 yd = 0.9144 m and 1 mi = 1,609.344 m, all exact.
⚠️ Common mistakes & edge cases
Reporting perimeter in square units
Perimeter is a length, so it is measured in ft, m or in, never ft² or m². If your answer carries a little "2", you have calculated area by mistake. Keep the units linear.
Using diameter instead of radius for a circle
The circumference formula 2πr needs the radius (center to edge), not the diameter (edge to edge). Measuring straight across and plugging it in doubles your answer. Halve the diameter first, use C = πd, or tap "I know the diameter" in the calculator.
Treating an irregular polygon as regular
P = n × s only works when every side is identical. If the sides differ, multiplying by the number of sides gives a wrong answer; add each side length one by one instead.
Mixing units in one shape
Entering one side in feet and another in inches scrambles the result. Convert everything to a single unit before measuring, then read the perimeter in that unit.
❓ Frequently asked questions
What is the perimeter of a shape?
The perimeter is the total distance around the outside edge of a two-dimensional shape: the length you would walk if you traced its boundary once and came back to the start. For shapes with straight sides you simply add up the length of every side. For a circle the equivalent measurement is called the circumference. Perimeter is always a length, so it is measured in linear units such as feet, meters or inches (never square units).
How do you calculate the perimeter of a rectangle?
Add the length and the width, then double the result: P = 2 × (L + W). For example, a rectangle 8 m long and 5 m wide has a perimeter of 2 × (8 + 5) = 2 × 13 = 26 m. Doubling works because a rectangle has two lengths and two widths, so you could also write it as L + L + W + W.
How do you find the perimeter of a circle?
A circle does not have sides, so its perimeter is called the circumference. Use C = 2 × π × r, where r is the radius (the distance from the center to the edge). If you only know the diameter d, the formula is C = π × d, since the diameter is twice the radius; the calculator accepts either measurement. With r = 7, the circumference is 2 × 3.14159 × 7 = about 43.98 units.
What is the formula for the perimeter of a triangle?
Add the three side lengths together: P = a + b + c. This works for any triangle (scalene, isosceles or equilateral) because the perimeter is just the sum of the boundary. For an equilateral triangle, where all three sides are equal, you can shortcut to P = 3 × s.
How do you calculate the perimeter of a regular polygon?
A regular polygon has every side the same length, so multiply the number of sides by the side length: P = n × s. A regular hexagon (6 sides) with 4-inch sides has a perimeter of 6 × 4 = 24 inches. For an irregular polygon, where sides differ, you must add each side individually.
What units is perimeter measured in?
Perimeter is a one-dimensional length, so it uses linear units: inches, feet, yards, miles, millimeters, centimeters, meters or kilometers. This is different from area, which uses square units (square feet, square meters). A common mistake is to report a perimeter in square units: if your answer ends in a little 2, you have calculated area, not perimeter.
What is the difference between perimeter and circumference?
They measure the same idea, the distance around a shape, but the word circumference is reserved for circles and other curved closed shapes, while perimeter is used for shapes with straight sides such as squares, rectangles and polygons. Both are lengths and both use linear units. This calculator labels the circle result as circumference and everything else as perimeter.
How do you find the perimeter of an irregular shape?
For any shape made of straight edges, measure each individual side and add them all up; there is no shortcut formula. For composite shapes (an L-shape, for instance), break the outline into segments, measure each, and sum the segments that form the outer boundary. Do not count interior dividing lines, only the outside edge.
Can you find perimeter if you only know the area?
Not for a general shape, because many different shapes can share the same area but have very different perimeters. There are exceptions for specific shapes: for a square, the side equals the square root of the area, so the perimeter is 4 × √(area); for a circle, you can work back from area to radius and then to circumference. But for a generic rectangle, knowing only the area is not enough because length and width can vary.
Why does my triangle perimeter say the sides cannot form a triangle?
Because of the triangle inequality: the longest side of a triangle must be shorter than the sum of the other two sides. If you enter 2, 3 and 10, the two short sides (2 + 3 = 5) cannot reach across the long side (10), so no triangle exists. Re-check your measurements; in a valid triangle every side is less than the sum of the other two.
Why does the trapezoid option say the sides cannot form a trapezoid?
In this calculator sides a and c are the two parallel sides and b and d are the legs. Sliding one leg over turns the legs and the difference of the parallel sides into a triangle, so a trapezoid only exists when that difference, |a − c|, is larger than |b − d| and smaller than b + d. For example 5, 4, 3, 4 works (the difference of 2 lies between 0 and 8), while 10, 1, 2, 1 cannot close. When a and c are equal the shape is a parallelogram and both legs must match.
A rectangle's perimeter is 50 m and its length is 15 m. What is its area?
Half the perimeter equals length + width, so 50 ÷ 2 = 25 m. Subtract the known length: 25 − 15 = 10 m is the width. Then the area is length × width = 15 × 10 = 150 square meters. The general recipe for this common word problem is: width = (perimeter ÷ 2) − length, then area = length × width.
How do you find a missing side when you know the perimeter?
For a rectangle, half the perimeter is length + width, so subtract the side you know: if the perimeter is 50 ft and one side is 15 ft, the other side is 50 ÷ 2 − 15 = 10 ft. For a square, every side is equal, so a side is simply the perimeter divided by 4. For a regular polygon with n equal sides, each side is the perimeter divided by n.
💡 Good to know
Same area, different perimeter
Of all shapes with a given area, the circle has the smallest perimeter, and a square has the smallest perimeter of any rectangle. A long, narrow rectangle can have a far larger perimeter than a square of the same area, which is why compact shapes use less fencing.
Circumference is just a circle's perimeter
The only reason we use a special word is history: mathematically, circumference and perimeter both mean "the distance around." Both are lengths in linear units, so a circle with a 7 ft radius (43.98 ft around) and a square with 11 ft sides (44 ft around) have almost exactly the same boundary length.
Doubling a side doubles the perimeter
Perimeter scales linearly: double every dimension and the perimeter doubles, but the area quadruples. That difference matters when you scale a plan up: the edging cost roughly doubles while the surface (and paint) cost grows four times.
Related Calculators
Area Calculator
Calculate the area of common shapes
Circle Calculator
Calculate area, circumference, radius and diameter
Triangle Calculator
Solve triangle sides, angles and area
Trapezoid Calculator
Area, perimeter and height of a trapezoid
Square Footage Calculator
Calculate the square footage of any area
Fence Calculator
Estimate posts, rails and pickets for a fence
Linear Feet Calculator
Linear feet of boards, trim and fencing
Arc Length Calculator
Arc length, chord and sector area from radius and angle