From the side
P = 4 × c
Four sides of equal length.
Calculate the perimeter of a square from its side (P = 4s) or its diagonal (P = 2√2 × d). Formulas explained, finding the side from the perimeter, edging and fencing examples, in the length unit of your choice.
Perimeter
This calculator gives the perimeter of a square, the total length of its four sides, from the side or the diagonal. Use it to check an elementary or middle school exercise, or to plan the edging for a square raised bed, the fencing for a pen or the piping around a cushion.
All four sides of a square have the same length s, so its perimeter is P = s + s + s + s = 4 × s. A square with 6 cm sides has a perimeter of 24 cm.
When only the diagonal d is known, the tool recovers the side with the Pythagorean theorem: d² = 2s², so s = d ÷ √2. The perimeter is then P = 4d ÷ √2 = 2√2 × d, about 2.828 times the diagonal.
The result is a length in the same unit as the value you entered. Because the relationship is proportional, doubling the side doubles the perimeter, while the area is multiplied by four.
For the reverse operation, just divide by four: a square with a 36 cm perimeter has 9 cm sides. This tells you how large a square you can lay out with a given length of edging or fencing.
Side or Diagonal, depending on what the problem gives or what you can measure.
All common length units, metric and imperial, are available.
It appears in the same unit and updates as you type.
The perimeter follows from the side or the diagonal.
P = 4 × c
Four sides of equal length.
P = 2√2 × d
The side equals d ÷ √2, by the Pythagorean theorem.
c = P ÷ 4
The inverse operation.
Example: s = 2.5 m, P = 10 m.
Work out the edging for a square vegetable bed or sandbox, or the fencing for a square pen.
Plan the molding, sealant or trim around a square hatch, mirror or panel.
Check a perimeter exercise and understand the link between side, diagonal and the square root of 2.
Measure the piping or bias tape needed around a cushion or a square of fabric.
4 × 6 = 24 cm.
Input
s = 6 cmResult
P = 24 cmThe side is 10 ÷ √2 ≈ 7.07 cm, so P ≈ 4 × 7.07 ≈ 28.28 cm.
Input
d = 10 cmResult
P ≈ 28.28 cmFour 1.2 m boards, or 4.8 m of flexible edging.
Input
square with 1.2 m sidesResult
P = 4.8 m60 m of fencing, minus the width of the access gate.
Input
s = 15 mResult
P = 60 m20 ÷ 4 = 5 m per side, for a pen of 25 m².
Input
20 m of fencing availableResult
maximum side of 5 mP = 4 × s, where s is the length of one side. With the diagonal d, P = 2√2 × d ≈ 2.828 × d.
Divide the perimeter by 4: s = P ÷ 4. A square with a 48 cm perimeter has 12 cm sides.
Divide the diagonal by √2 (about 1.414) to get the side, then multiply by 4. A 14.14 cm diagonal gives a 10 cm side and a 40 cm perimeter.
No. With a 20 m perimeter, a 5 m square covers 25 m², while an 8 × 2 m rectangle covers only 16 m². The square gives the largest area.
Because it is simply the sum of four equal sides. The constant of proportionality is 4.
Related tools
Tools similar or complementary to this one.
Find the area of a square from its side (s²) or its diagonal (d² ÷ 2).
Find the distance around a rectangle from its length and width: P = 2 × (L + W).
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.