Skip to content
Other

Perimeter of a Square Calculator

Enter any one known measurement of a square - its side length, diagonal, perimeter, or area - and this calculator instantly finds the rest. Switch between metric and imperial units and see every step of the working. Useful for fencing, framing, flooring, and any project where you need to know the total boundary length of a square shape.

Your details

Choose which measurement you already know. The calculator solves the rest.
The unit for every length and area shown. The shape is the same in any unit, so this only changes the labels.
The length of one side of the square.
Perimeter
20m

Total boundary length of the square (4 times the side length)

Side length5m
Diagonal7.0711m
Area25
0112.52251815
Side length (m)
Value (m / m²)
Side length (m)Perimeter (m)Area (m²)
1.2551.56
1.947.753.75
2.6310.56.89
3.3113.2510.97
41616
4.6918.7521.97
5.3821.528.89
6.0624.2536.75
6.752745.56
7.4429.7555.32
8.1332.566.02
8.8135.2577.66
9.53890.25
10.1940.75103.79
10.8843.5118.27
11.5646.25133.69
12.2549150.06
12.9451.75167.38
13.6354.5185.64
14.3157.25204.85
1560225
  • Perimeter (m)
  • Area (m²)

Perimeter of this square: 20.0000 m

  • The side length is 5.0000 m, so the perimeter is 4 times that: 20.0000 m.
  • The diagonal from corner to corner is 7.0711 m (the side times the square root of 2, approximately 1.4142).
  • The total interior area is 25.0000 m².
  • For a square of this size, the perimeter-to-area ratio is 4.0000 per m - squares have the smallest perimeter for their area of any rectangle.

Next stepIf you are buying fencing or framing, add an allowance for corners, overlaps or waste. A common rule of thumb is to add 5 to 10 percent to the calculated perimeter.

Formula

P=4a,a=d2,a=A,d=a2,A=a2P = 4a, \quad a = \dfrac{d}{\sqrt{2}}, \quad a = \sqrt{A}, \quad d = a\sqrt{2}, \quad A = a^{2}

Worked example

A square garden has a side of 5 m. Perimeter = 4 x 5 = 20 m. Diagonal = 5 x sqrt(2) = 7.071 m. Area = 5 x 5 = 25 m2. To fence this garden you need 20 m of fencing (plus a waste allowance).

What is the perimeter of a square?

The perimeter of a square is the total length of its boundary - the sum of all four sides. Because every side of a square has the same length, the perimeter is always four times the side length. If a square has a side of 5 metres, its perimeter is 20 metres. The perimeter is what you would measure if you walked all the way around the edge of the square without lifting your foot.

Perimeter of a square formula

The standard formula is P = 4a, where P is the perimeter and a is the side length. If you know the diagonal d instead, you can first recover the side with a = d / sqrt(2), then apply P = 4a. If you know the area A, find the side as a = sqrt(A), then calculate P = 4 * sqrt(A). If you already know the perimeter and want the side, use a = P / 4. All four relationships are built into this calculator - just pick the quantity you already have.

Squares vs rectangles: why the perimeter formula is simpler

For a general rectangle, the perimeter is P = 2(l + w), because length and width can differ. A square is the special case where l = w, which collapses the formula to P = 4a. This also means the square has the smallest perimeter of any rectangle with the same area - equivalently, for a given perimeter, the square encloses the largest area. That property is why square plots of land are efficient to fence, and why square rooms use less wall material than a thin, long room of the same floor space.

Real-world uses of square perimeter calculations

Knowing the perimeter of a square is useful in a wide range of practical situations. In construction and landscaping, it tells you how much fencing, edging, or trim to buy for a square plot or bed. In picture framing and artwork, it gives the total frame length needed for a square canvas. In tiling and flooring, it helps estimate border tile runs. In sports, the perimeter of a square pitch or court sets the length of the boundary line. Add a waste allowance of 5 to 10 percent when purchasing materials to account for cuts, corners, and overlaps.

Square measurements for common side lengths (metres)

Side (m)Perimeter (m)Diagonal (m)Area (m²)
141.4141
282.8284
3124.2439
4165.65716
5207.07125
6248.48536
83211.31464
104014.142100
156021.213225
208028.284400
5020070.7112500
100400141.42110000

Perimeter, diagonal, and area for squares with common side lengths.

Frequently asked questions

What is the formula for the perimeter of a square?

The formula is P = 4a, where a is the length of one side. Since all four sides of a square are equal, you simply multiply the side length by four. For example, a square with side 7 cm has a perimeter of 28 cm.

How do I find the perimeter of a square if I know the diagonal?

Divide the diagonal by the square root of 2 (approximately 1.4142) to get the side length, then multiply by four. Formula: P = 4 times (d divided by sqrt(2)), which simplifies to P = 2 times d times sqrt(2). For example, a diagonal of 10 m gives a side of about 7.071 m and a perimeter of about 28.284 m.

How do I find the perimeter of a square from its area?

Take the square root of the area to find the side length, then multiply by four. If the area is 36 square metres, the side is sqrt(36) = 6 m and the perimeter is 24 m.

What is the difference between the perimeter and the area of a square?

The perimeter is the total length of the boundary (measured in units such as metres or feet), while the area is the size of the interior surface (measured in square units such as square metres or square feet). For a square with side a, the perimeter is 4a and the area is a squared.

Why does a square have a smaller perimeter than other rectangles with the same area?

Among all rectangles with a fixed area, the square minimises the perimeter. This is a consequence of the AM-GM inequality: for a given product l times w (the area), the sum l + w is smallest when l = w. In practice this means a square-shaped field, room, or plot uses less fencing or border material than a rectangular one of equal area.

How do I convert the perimeter to a different unit?

The perimeter is a length, so you use standard length conversions. Common ones: 1 foot = 12 inches, 1 yard = 3 feet, 1 metre = 100 centimetres, 1 kilometre = 1000 metres, 1 inch = 2.54 centimetres. The unit selector in this calculator handles the most common metric and imperial units automatically.

Sources

Written by Grace Mbeki, MSc Data Scientist & Educator · Nairobi, Kenya

Turning everyday numbers into clear, actionable answers for the decisions that matter most.

Search 3,500+ calculators

Loading search…