Rectangle Perimeter Calculator
Calculates the total boundary length of a rectangle from its length and width using P = 2·(length + width). Use it for fencing a yard, framing a picture, ordering molding, or any project that needs the distance around a rectangular space.
Last updated: May 2026
Compare with similar
About this calculator
The perimeter of a rectangle is the total distance around its outer edge. Because a rectangle has two pairs of equal sides — two of length and two of width — the formula is P = 2 × (length + width). You simply add the length and width together, then double the result to account for both pairs. This is useful any time you need to know how much material surrounds a rectangular area: fencing for a yard, baseboard trim for a room, gasket material for a flat seal, or picture frames for art. Variables: length (longer or stated longer side), width (shorter or stated shorter side); both in the same linear unit. Edge cases: the formula assumes all four interior angles are exactly 90° (the definition of a rectangle) — for parallelograms with non-right angles, the same formula gives the perimeter, but for trapezoids and irregular quadrilaterals you must sum the four sides individually. A square is a special rectangle where length = width, so P = 4 × side. Perimeter is a linear measurement (m, cm, ft) and is conceptually distinct from area, which covers the enclosed two-dimensional surface and uses different units (m², ft²). The formula gives the closed-loop boundary length; deduct gate widths or door openings for fencing or wall-trim projects.
How to use
Example 1: Fencing a backyard 12 m long and 8 m wide. Step 1: add length + width = 12 + 8 = 20 m. Step 2: multiply by 2 = 40 m of fencing needed. Verify: walk around mentally — 12 + 8 + 12 + 8 = 40 m, matching the formula. If you add a 1 m gate, purchase 39 m of fencing. Example 2: Crown molding for a 14 ft × 10 ft room with one 3 ft door opening. Step 1: perimeter = 2 × (14 + 10) = 48 ft. Step 2: subtract door = 48 − 3 = 45 ft of molding. Add 10% waste (4.5 ft) for cuts and mistakes → buy about 50 ft total. Verify: the four walls measure 14 + 10 + 14 + 10 = 48 ft, minus 3 ft door = 45 ft baseline.
Frequently asked questions
What is the formula for the perimeter of a rectangle and how does it work?
The perimeter formula is P = 2 × (length + width). It works because a rectangle has two sides of equal length and two of equal width, so adding one of each and doubling captures all four sides. For a rectangle 10 m × 4 m, the perimeter is 2 × (10 + 4) = 28 m. The formula is among the simplest in geometry and applies to any shape with four right-angled corners, regardless of orientation. It is also the foundation for related calculations: for example, a fenced yard's perimeter determines linear fencing material, while a room's perimeter determines baseboard or crown molding quantity.
How is the perimeter of a rectangle different from its area?
Perimeter measures the total length of the boundary around the rectangle, given in linear units like meters or feet. Area measures the two-dimensional space inside the rectangle, expressed in square units like m² or ft². For a 10 m × 4 m rectangle, the perimeter is 28 m but the area is 40 m². Perimeter and area scale differently with size: doubling both dimensions doubles the perimeter but quadruples the area. Use perimeter when buying edging, fencing, or trim (linear materials); use area when buying flooring, paint, or turf (surface materials).
When would I need to calculate the perimeter of a rectangle in real life?
Rectangle perimeter calculations come up in many practical situations. Homeowners use it to determine how much fencing they need for a rectangular yard or how much trim is needed for a room. Builders and carpenters calculate perimeter when framing walls or cutting moldings. Artists and framers use it to size picture frames. Athletes use it because a standard 400 m running track is designed around the perimeter of an inner rectangular field with two semicircular ends. Even gardeners use it when laying edging stones along a rectangular bed.
What are common mistakes when calculating rectangle perimeter?
Forgetting to multiply by 2 and just adding length + width gives only half the perimeter — a common error in homework. Mixing units (entering length in meters and width in centimeters) produces a meaningless sum without first converting both to the same unit. Confusing perimeter with area is conceptually different: P uses linear addition, while A = length × width uses multiplication. Including openings (gates, doors) that should be subtracted leads to over-buying fencing or trim. Treating a parallelogram as a rectangle works for perimeter (the formula gives the right answer) but fails for area, where the perpendicular height matters.
When should I NOT use this rectangle perimeter formula?
Trapezoids, rhombi, and other quadrilaterals without two pairs of equal sides require summing all four sides individually rather than using the (length + width) shortcut. Irregular polygons need their sides measured and summed one by one — no shortcut applies. Curved boundaries (circles, ellipses, freeform shapes) use entirely different formulas: circumference C = 2πr for circles, and integral calculus for irregular curves. Three-dimensional 'edge length' problems (such as the total edge length of a box) use a different sum: 4 × (length + width + height) for a rectangular prism. For walls of a room you intend to paint or wallpaper, you typically want area, not perimeter — perimeter only helps with linear materials like trim and crown molding.