Perimeter
P = 2 × (L + l)
Twice the sum of the length and the width.
Calculate the perimeter of a rectangle, the total length of its outline, from its length and width. The formula P = 2 × (L + W) explained, practical examples (baseboards, fencing, picture frame) and different units accepted for each side.
Perimeter
This calculator adds up the four sides of a rectangle to give its perimeter, the total length of its outline. It is the measurement you need to install baseboards, fence a yard, bind a rug, frame a picture or check an elementary or middle school geometry exercise.
A rectangle has two equal lengths and two equal widths. Its perimeter is therefore P = L + W + L + W, written P = 2 × (L + W) or P = 2L + 2W. With a length of 5 m and a width of 3 m: 2 × (5 + 3) = 16 m.
The two dimensions can be entered in different units; they are converted before being added. The result is a length, expressed in the unit of the first field, not an area: perimeter is measured in meters, centimeters or feet, never in m² or ft².
Perimeter and area do not move together. Two plots with the same perimeter can have very different areas: 2 × (10 + 10) = 40 m for 100 m², but 2 × (19 + 1) = 40 m as well for only 19 m². For a given perimeter, the square is the rectangle that encloses the most area.
In practice, you often subtract lengths from the outline: the width of doorways for baseboards, the width of a gate for a fence. You can also do the opposite and add a cutting allowance.
Type the value and its unit, which will also be the unit of the result.
Choose any unit you like: the values are harmonized before the calculation.
The length of the outline appears instantly and updates as you type.
The outline of a rectangle is made of two lengths and two widths.
P = 2 × (L + l)
Twice the sum of the length and the width.
P = 2L + 2l
The same calculation, doubling each side separately.
l = P ÷ 2 − L
Find the width from the perimeter and the length.
Example: L = 12 cm and W = 7 cm, P = 2 × 19 = 38 cm.
Work out the length of baseboard, crown molding, caulk or corner bead around a rectangular room.
Estimate the wire fencing, edging or number of posts needed around a lot or a vegetable garden.
Check a perimeter exercise, compare perimeter and area or find a missing dimension.
Measure the binding for a rug, the trim for a tablecloth or the molding for a frame.
2 × (5 + 3) = 2 × 8 = 16 m.
Input
L = 5 m, W = 3 mResult
P = 16 mPerimeter of 15.6 m, minus the doorway: 15.6 − 0.83 = 14.77 m.
Input
room 4.2 m × 3.6 m, door 0.83 mResult
≈ 14.77 m of baseboard2 × (30 + 18) = 96 m, minus the gate: 92.5 m.
Input
L = 30 m, W = 18 m, gate 3.5 mResult
92.5 m of fencingYou need 1.40 m of molding, plus the offcuts from the miter cuts at the four corners.
Input
L = 40 cm, W = 30 cmResult
P = 140 cm45 cm = 0.45 m, so 2 × (1.5 + 0.45) = 3.9 m.
Input
L = 1.5 m, W = 45 cmResult
P = 3.9 mP = 2 × (L + W), twice the sum of the length and the width. It is the same as adding up the four sides.
Divide the perimeter by two, then subtract the length: W = P ÷ 2 − L. A rectangle with a 26 cm perimeter and a length of 8 cm is 5 cm wide.
Perimeter measures the outline (in m or ft), area measures the surface inside (in m² or ft²). For a room, perimeter is for the baseboards and area is for the flooring.
Yes, a square is a rectangle whose length equals its width. The formula simplifies to P = 4 × s.
Calculate the perimeter of the room, subtract the width of each doorway, then add about 10% for cuts. Divide by the length of one piece to get the number of pieces to buy.
Related tools
Tools similar or complementary to this one.
Multiply length by width to get the area of a rectangle, even with different units for each side.
Find the distance around a square from its side (4 × s) or its diagonal (2√2 × d).
Calculate fence panels, posts and footing concrete.
Learn how to calculate areas, perimeters, diagonals, angles, surfaces and volumes, and open the Bethemesh geometry calculator directly on the shape you need.