Perimeter Calculator — Free Online Perimeter Tool
Calculate the perimeter of any common shape including rectangles, triangles, circles, and regular polygons with instant results and step-by-step formulas.
Perimeter
Formula Used
P = 2 × (10 + 6)The perimeter of the rectangle is 32.0000 units.
How to Use the Perimeter Calculator
- Select the shape: Use the dropdown menu to choose between Rectangle, Triangle, Circle (Circumference), or Regular Polygon. Each shape requires different input measurements, and the calculator dynamically adjusts its input fields to match your selection.
- Enter the dimensions: Input the required measurements for your chosen shape. For a rectangle, you need the length and width. For a triangle, enter all three side lengths (a, b, and c). For a circle, provide the radius. For a regular polygon, specify both the number of sides and the length of each side. All inputs accept decimal values for precision.
- Read the result: The right panel instantly displays the calculated perimeter (or circumference for circles) along with the specific formula used. The result updates in real time as you modify any input value, so you can experiment with different dimensions freely without pressing any button.
The calculator displays results with up to four decimal places for accuracy. You can use any consistent unit system since the formulas are unit-independent. Simply interpret the result in the same unit as your inputs.
Perimeter Formulas
Rectangle
P = 2 × (length + width) Triangle
P = a + b + c Circle (Circumference)
C = 2 × π × r Regular Polygon
P = n × s Variables Explained
- P (Perimeter): The total distance around the outside of the shape, measured in linear units. For a circle, this is called the circumference (C).
- length, width: The two dimensions of a rectangle. Length is typically the longer side, and width is the shorter side, though mathematically the labels are interchangeable.
- a, b, c: The three individual side lengths of a triangle. These must satisfy the triangle inequality: the sum of any two sides must be greater than the third side.
- r (radius): The distance from the center of a circle to any point on its edge. The diameter equals 2r.
- π (pi): A mathematical constant approximately equal to 3.14159265. It represents the ratio of any circle's circumference to its diameter.
- n (number of sides): The number of equal-length sides in a regular polygon. Must be at least 3.
- s (side length): The length of each individual side in a regular polygon where all sides are equal.
Step-by-Step Example
Calculate the perimeter of a rectangle with length 15.5 meters and width 8.3 meters:
- Identify the formula: P = 2 × (length + width)
- Add the dimensions: 15.5 + 8.3 = 23.8
- Multiply by 2: 2 × 23.8 = 47.6 meters
The perimeter of the rectangle is 47.6 meters. This means you would need 47.6 meters of fencing, edging, or trim to go completely around this rectangle.
Practical Examples
Example 1: David's Backyard Fence
David wants to install a fence around his rectangular backyard that measures 45 feet long and 30 feet wide. He needs to know the total length of fencing material to purchase. Using the rectangle perimeter formula:
- P = 2 × (45 + 30) = 2 × 75 = 150 feet
- He plans to install a 4-foot gate, so actual fencing needed: 150 - 4 = 146 feet
- At $12 per linear foot for materials, estimated cost: 146 × $12 = $1,752
David now knows he needs approximately 146 feet of fencing panels plus a 4-foot gate. Adding 10% extra for cuts and waste, he should purchase about 161 feet of fencing material to complete his project.
Example 2: Maria's Garden Border
Maria is planting a triangular herb garden with sides measuring 6 feet, 8 feet, and 10 feet. She wants decorative stone edging around the entire border. Using the triangle perimeter formula:
- P = 6 + 8 + 10 = 24 feet
- Stone edging is sold in 12-inch pieces, so she needs 24 pieces
- At $3.50 per piece: 24 × $3.50 = $84.00
Maria needs 24 feet of decorative stone edging. Interestingly, her triangle with sides 6-8-10 is a scaled version of the famous 3-4-5 right triangle, meaning she has a perfect right angle in her garden layout. For more triangle calculations, try our triangle calculator.
Example 3: Kevin's Circular Patio
Kevin is building a circular brick patio with a radius of 8 feet and needs to calculate the circumference for the border pavers. Using the circumference formula:
- C = 2 × π × 8 = 16π ≈ 50.27 feet
- Each curved border paver is 6 inches (0.5 feet) long
- Pavers needed: 50.27 / 0.5 ≈ 101 pavers (rounding up)
Kevin needs approximately 101 curved border pavers. He should order 110 pavers to account for cuts and breakage. The circular design gives him about 201 square feet of patio area, which he can verify using our circle calculator.
Example 4: Rachel's Hexagonal Gazebo
Rachel is designing a regular hexagonal gazebo where each side is 5 feet long. She needs to calculate the total railing length. Using the regular polygon formula:
- P = 6 × 5 = 30 feet of railing total
- She wants to leave one side open as the entrance: 30 - 5 = 25 feet
- Railing kits come in 6-foot sections: ⌈25 / 6⌉ = 5 kits needed
Rachel needs 5 railing kits to cover 25 feet of her hexagonal gazebo perimeter, leaving one 5-foot side open as the entrance. A regular hexagon has interior angles of 120 degrees each, which creates an elegant and spacious structure.
Perimeter Reference Table
| Shape | Dimensions | Formula | Perimeter |
|---|---|---|---|
| Rectangle | 10 × 5 | 2(10+5) | 30 |
| Rectangle | 20 × 12 | 2(20+12) | 64 |
| Square | 8 × 8 | 4 × 8 | 32 |
| Triangle | 3, 4, 5 | 3+4+5 | 12 |
| Triangle (equilateral) | s = 6 | 3 × 6 | 18 |
| Circle | r = 5 | 2π(5) | 31.42 |
| Circle | r = 10 | 2π(10) | 62.83 |
| Pentagon | s = 4 | 5 × 4 | 20 |
| Hexagon | s = 6 | 6 × 6 | 36 |
| Octagon | s = 3 | 8 × 3 | 24 |
Tips and Complete Guide
Understanding the Relationship Between Perimeter and Area
Perimeter and area are related but independent measurements. Shapes with the same perimeter can have very different areas, and shapes with the same area can have very different perimeters. Among all shapes with a given perimeter, the circle encloses the maximum area. This is known as the isoperimetric inequality. For rectangles specifically, a square always has the largest area for a given perimeter. Understanding this relationship is valuable in optimization problems, such as maximizing garden area with a fixed amount of fencing.
Perimeter in Construction and Home Improvement
Construction professionals rely on perimeter calculations daily. Baseboard and crown molding installation requires measuring the room perimeter and subtracting doorways. Exterior siding estimates start with the building perimeter multiplied by wall height. Concrete footings for foundations follow the perimeter of the structure. Roofing drip edge and gutter installation require knowing the roof edge perimeter. When ordering materials, always add 10 to 15 percent extra to account for cuts, joints, and waste. Accurate perimeter measurements save money and prevent project delays.
Working with Composite Shapes
Many real-world shapes are composites of simpler shapes. To find the perimeter of an L-shaped room, measure each exposed wall segment and add them together. For a shape that combines a rectangle and semicircle (like a running track), add the two straight sides of the rectangle plus the circumference of the full circle (since the two semicircular ends form one complete circle). The key principle is that perimeter only includes the outer boundary, so any interior edges where shapes join are excluded from the total.
Perimeter of Regular Polygons and Approaching a Circle
An interesting mathematical concept is that as the number of sides of a regular polygon increases while keeping the perimeter constant, the shape increasingly resembles a circle. A regular polygon with 100 sides is nearly indistinguishable from a circle. Ancient mathematician Archimedes used this principle to approximate pi by inscribing and circumscribing regular polygons around a circle. Starting with hexagons and doubling the sides repeatedly, he calculated pi to be between 3.1408 and 3.1429, remarkably accurate for over 2,200 years ago.
Common Mistakes to Avoid
- Mixing up perimeter and area units: Perimeter uses linear units (feet, meters) while area uses square units (ft², m²). Reporting a perimeter as "50 square feet" is incorrect since perimeter should be "50 feet."
- Inconsistent units: If one side is measured in feet and another in inches, convert all measurements to the same unit before calculating. Mixing units produces incorrect results.
- Forgetting sides of a shape: When measuring irregular rooms, ensure you measure every wall segment including alcoves, bump-outs, and indentations. Sketch the shape first and label each segment.
- Confusing radius and diameter for circles: The circumference formula uses radius (C = 2πr) or diameter (C = πd). Using the diameter in the radius formula doubles your answer. Always verify which measurement you have.
- Invalid triangle side lengths: Three lengths can only form a triangle if the sum of any two sides exceeds the third side. Entering sides of 2, 3, and 10 does not form a valid triangle since 2 + 3 = 5 is less than 10.
Frequently Asked Questions
Perimeter is the total distance around the outside of a two-dimensional shape, measured in linear units like feet, meters, or inches. Area, on the other hand, measures the space enclosed within a shape and is expressed in square units such as square feet or square meters. Think of perimeter as the length of fence you need to surround a yard, while area is the amount of grass inside that yard. Both are fundamental measurements in geometry, but they answer different questions. Our perimeter calculator handles rectangles, triangles, circles, and regular polygons.
The perimeter of a rectangle is calculated using the formula P = 2 × (length + width). Simply add the length and width together, then multiply by 2. For example, a rectangle with a length of 12 feet and a width of 8 feet has a perimeter of 2 × (12 + 8) = 2 × 20 = 40 feet. This works because a rectangle has two pairs of equal sides. If you know all four side lengths individually, you can also add them directly: P = side₁ + side₂ + side₃ + side₄.
The circumference is the perimeter of a circle, calculated using the formula C = 2πr, where r is the radius. Alternatively, you can use C = πd, where d is the diameter. The constant π (pi) is approximately 3.14159. For example, a circle with a radius of 7 cm has a circumference of 2 × 3.14159 × 7 = 43.98 cm. The circumference-to-diameter ratio is always π regardless of the circle's size, which is one of the most fascinating properties in mathematics.
For an irregular shape, measure each side individually and add all the side lengths together. If the shape has curved sections, you may need to approximate by breaking curves into small straight segments or use calculus for exact measurements. For practical purposes like measuring a room or garden, use a measuring tape along each edge and sum all measurements. Our calculator handles regular shapes directly. For complex shapes, break them into simpler components like rectangles and triangles, calculate each perimeter section, and combine them while subtracting any shared interior edges.
The perimeter of a regular polygon is P = n × s, where n is the number of sides and s is the length of each side. Regular polygons have all sides of equal length and all interior angles equal. For example, a regular hexagon (6 sides) with each side measuring 5 inches has a perimeter of 6 × 5 = 30 inches. Common regular polygons include equilateral triangles (3 sides), squares (4 sides), pentagons (5 sides), hexagons (6 sides), and octagons (8 sides). Our calculator supports any regular polygon from 3 to 100 sides.
Perimeter calculations are essential in countless real-world applications. Homeowners use perimeter to determine how much fencing is needed for a yard, how much baseboard trim to buy for a room, or how much edging for a garden bed. Construction workers calculate perimeters for foundation layouts, framing walls, and installing crown molding. Landscapers use perimeter measurements for border plantings and irrigation lines. Farmers calculate field perimeters for fencing livestock. Even picture framing requires perimeter calculations to determine the length of frame molding needed.
You cannot determine the exact perimeter of a triangle from just two sides because the third side can vary. However, you can establish bounds using the triangle inequality theorem: the third side must be greater than the absolute difference of the other two sides and less than their sum. For example, if two sides are 5 and 8, the third side must be between 3 and 13, giving a perimeter range of 16 to 26. If you know two sides and the included angle, you can use the law of cosines to find the third side exactly, then sum all three for the perimeter.
Perimeter is always measured in linear units, not square units. Use the same unit for all sides of the shape. Common units include inches, feet, yards, and miles in the US customary system, or millimeters, centimeters, meters, and kilometers in the metric system. For room measurements, feet or meters are typical. For land parcels, use feet, meters, or even miles for very large areas. Always convert all measurements to the same unit before calculating. Our calculator works with any consistent unit system since the formulas are unit-independent.
Related Calculators
Area Calculator
Calculate the area of common 2D shapes including rectangles, triangles, circles, and more.
Triangle Calculator
Solve triangles with angles, sides, area, and perimeter from any combination of inputs.
Circle Calculator
Find radius, diameter, circumference, and area of circles from any known value.
Square Footage Calculator
Calculate square footage for rooms and spaces with unit conversion support.
Percentage Calculator
Calculate percentages with five operation modes for any math problem.
Unit Converter
Convert between length, area, volume, and other measurement units.
Disclaimer: This calculator is for informational and educational purposes only. Results are estimates and may not reflect exact values.
Last updated: February 23, 2026
Sources
- Math is Fun — Perimeter: mathsisfun.com
- Khan Academy — Area and Perimeter: khanacademy.org
- National Institute of Standards and Technology (NIST) — SI Units: nist.gov