Two garden beds can hold the same amount of soil at the same depth and require different lengths of fence. A bed 3 feet wide and 8 feet long covers 24 square feet. So does a bed 4 feet wide and 6 feet long. The longer, narrower bed needs 2 more feet of fence.
Both numbers describe a rectangle, but they answer different questions. Area measures the surface inside it. Perimeter measures the path around its edge.

Count squares and edges separately
Picture the first bed as three rows of eight one-foot squares. That makes \(3\times8=24\) square feet. Its four sides measure 3, 8, 3, and 8 feet, so the perimeter is \(3+8+3+8=22\) feet.
The second bed holds the same 24 squares in four rows of six. Its perimeter is \(4+6+4+6=20\) feet. You can move the tiles from one layout to the other without losing any of them. The outline changes because the new layout shares more edges between neighboring tiles, leaving fewer along the outside.
Find the best rectangle for whole-foot sides
Imagine the garden has room for either orientation and the sides must be whole numbers of feet. Start with the factor pairs of 24. Each pair gives a different rectangular layout. Rotating one of the beds leaves both measurements the same.
| Side lengths (feet) | Area (square feet) | Perimeter (feet) |
|---|---|---|
| 1 and 24 | 24 | 50 |
| 2 and 12 | 24 | 28 |
| 3 and 8 | 24 | 22 |
| 4 and 6 | 24 | 20 |
The 4-by-6-foot bed uses the least fence of the four. If fractional side lengths are allowed, a square would need slightly less. Each side would measure \(\sqrt{24}\) feet, for a perimeter of \(4\sqrt{24}\), or about 19.6 feet.
There is a reason the square wins. For length \(l\) and width \(w\), \((l+w)^2=(l-w)^2+4lw\). The product \(lw\) is fixed when the area stays fixed. The squared difference is smallest at zero, when the two sides are equal. That also gives the smallest sum of the sides and the shortest perimeter.
Start with fence length and the question changes
Now suppose you already have 18 feet of fence. A 1-by-8-foot rectangle and a 4-by-5-foot rectangle both use all 18 feet. They enclose 8 and 20 square feet, respectively. The first gives a long, narrow strip, while the second leaves more planting space.
The measure to hold fixed depends on the job. Set a planting-area target if you know how much space the plants need. Set a perimeter limit if you know how much fence you have. The formulas for a rectangle let you calculate the other measurement for each layout.


