How this instrument works
A rectangle's perimeter is the total distance around its boundary, and the shape's defining property does the heavy lifting: opposite sides are always equal in length, so the four-term sum l + w + l + w collapses to the doubled pair 2(l + w). Unlike a general quadrilateral, where all four edges must be measured on their own, a rectangle needs only its length and width — the other two sides are already fixed by the shape itself.
A fixed perimeter does not pin down a fixed area, and this page's own numbers show it: a 6-by-4 rectangle and a 9-by-1 rectangle both carry a perimeter of 20, yet their areas are 24 and 9 — nearly threefold apart from stretching the same length of fence into a thinner shape. Push the ratio of length to width back toward equality instead and area climbs again, peaking exactly at the square: among every rectangle sharing one perimeter, the square alone encloses the most space.
The formula also degenerates cleanly rather than breaking. Let the width shrink toward zero and the rectangle flattens into a doubled line segment, its perimeter falling to twice whatever length remains — a boundary traced out and back still has a length. The one arithmetic slip worth watching for is stopping at l + w instead of doubling it: that half-sum is the semiperimeter, a real and useful quantity in its own right, but it is not the perimeter this calculator reports.
- Enter one side into the Length field.
- Enter the adjacent side into the Width field.
- Read Perimeter for the total distance around the rectangle, in the same unit as your two inputs.
- Swap the numbers between Length and Width if you like — 2(l + w) gives the same answer regardless of which side carries which label.
Worked example — a 6 by 4 rectangle
A patio measures 6 metres by 4 metres, and edging is priced by the metre, so the figure to order is the perimeter: P = 2(l + w) = 2(6 + 4) = 2 × 10 = 20 metres. There is no separate step for the two long sides and two short sides — the doubled sum already accounts for all four at once.
A square patio built from that same 20 metres of edging would measure 5 by 5, since 2(5 + 5) = 20 as well — an identical perimeter, but 25 square metres of paving instead of 24, a full square metre more from the same length of border. Perimeter fixes how much edging is needed; it does not fix how much ground gets covered.
Questions
What is the formula for the perimeter of a rectangle?
P = 2(l + w), where l and w are two adjacent sides. Because a rectangle's opposite sides are always equal, only two measurements are needed; a 6-by-4 rectangle, for instance, has perimeter 2(6 + 4) = 20, whatever unit those two figures share.
Why is the formula written as 2(l + w) instead of l + w + l + w?
Both say the same thing — 2(l + w) is the four-term sum l + w + l + w with a common factor of 2 pulled out front. Writing it doubled makes the semiperimeter, l + w, visible as its own useful quantity, and it is one addition cheaper to compute by hand.
Does a larger perimeter always mean a larger area?
No. Perimeter and area measure different things, and one fixed perimeter can enclose very different areas: 20 metres of edging makes a 24-square-metre patio at 6 by 4, but only 9 square metres at 9 by 1. Among rectangles sharing one perimeter, the square always encloses the most area.
How is this different from a calculator that starts with the area instead?
This page assumes Length and Width are both already known — a straight addition and doubling, no algebra required. A version starting from area and one side has to divide first to recover the missing side, then run the same 2(l + w) step; a version starting from perimeter and one side subtracts instead. This one is the direct case the others reduce to.
What happens if Width is entered as zero?
The rectangle degenerates into a line segment, and the formula still holds: with w = 0, perimeter is 2(l + 0) = 2l — twice the remaining side, since the boundary is now traced out and back along that one length. It is a valid limiting case, not an error.
Is a square just a special case of this formula?
Yes — a square is a rectangle where length and width happen to be equal, so P = 2(l + w) simplifies to P = 4l. Entering 5 for both Length and Width returns a perimeter of 20, identical to the 6-by-4 rectangle above despite enclosing one more square metre of area.