Skip to main content
CalcMax

Square Calculator

Range: 0 cm – 1,000,000,000 cm

Range: 0 cm – 4,000,000,000 cm

Range: 0 cm² – 1,000,000,000,000,000,000 cm²

Result

5.0000 cm

Side

Perimeter
20.0000 cm
Area
25.0000 cm²
Diagonal
7.0711 cm

A square calculator takes any one of three measurements of a square — the side, the perimeter or the area — and returns all four: the side, the perimeter, the area and the diagonal. This is a different shape of question from the rectangle page next door, and the difference is worth seeing clearly. A rectangle has two degrees of freedom, so you have to supply two numbers before anything can be worked out. A square has one: every square is the same shape at a different size, and a single number saying how big settles everything about it. So instead of asking you for two particular numbers, this page accepts whichever one you happen to have. If you have measured a side, put it in the side box. If you know the perimeter because you are buying a frame, put it in the perimeter box. If you know the area because you are covering a surface, put it there. The other three readings follow, and the page echoes back the one you supplied so that the row reads as a complete set. The arithmetic is worth knowing because it is the whole of this page. The perimeter is four sides. The area is the side squared. The diagonal is the side times the square root of two, which is the Pythagorean theorem applied to a square: the diagonal is the hypotenuse of a right triangle whose two legs are both the side, so it is the square root of two sides squared, which is the side times the root of two. And running it backwards is just as simple — divide a perimeter by four to get the side, take the square root of an area to get the side, and then everything else follows from the side. Four readings, one input, and only three formulas behind them.

Squares entered from each of the three directions

Entered asSide (cm)Perimeter (cm)Area (cm²)Diagonal (cm)
s520257.0711
P520257.0711
A520257.0711
s1411.4142
s0000
s104010014.1421
A1.41425.656922
P31294.2426

Eight squares, and the first column says which box was filled in — without it the table would be unreadable, since a side of 5, a perimeter of 20 and an area of 25 all produce the same four readings. That is not three rows computed twice: it is the point of the page, and the first three rows are there to make it visible. The fourth row is the unit square, where the diagonal is 1.4142, which is the square root of two itself. The sixth row is a side of 10, where the diagonal is 14.1421 — the same root at a larger scale, and the same number the rectangle table prints for its 10 by 10 square. The seventh row is the one worth remembering: an area of 2 gives a side of 1.4142 and a diagonal of exactly 2, because the side is the root of two and the diagonal is the side times the root of two and the two cancel. The last row is a perimeter of 12, giving a side of 3, an area of 9 and a diagonal of 4.2426, which is 3√2. The fifth row is a side of zero, where every column is zero and the answer is real rather than missing. Every number here is recomputed from its entry when the page is built, in centimetres, and the four decimals are the same four decimals the results panel uses.

Formula

s = P ÷ 4 = √A P = 4s A = s² d = s√2

Side
The length of any one of the four sides, in centimetres. All four are equal, so there is only one measurement to make. This is the box the page loads with, because the side is the number everything else is derived from
Perimeter
The distance all the way around, in centimetres, which is four times the side. If you filled this box instead, the page divides by four to recover the side before working out anything else
Area
The surface the square covers, in square centimetres, which is the side times itself. If you filled this box, the page takes its square root to recover the side, which is why an area has to be a positive number for the page to get anywhere
Diagonal
The distance from one corner to the opposite one, in centimetres, which is the side times the square root of two. It has no input box of its own, because a diagonal is a consequence of the size rather than a way of specifying it — but it is printed, since it is the measurement people most often want and least often expect
√2
The square root of two, about 1.4142136. It is the ratio of the diagonal of any square to its side, and it is the same number for every square ever drawn — which is what made it the first irrational number anyone noticed
Four decimal places
How wide every reading is written. The side and the perimeter are exact whenever the input is, but the diagonal always carries a √2 and so almost never ends, and an area recovered from a square root brings the same problem back into the side

This page is for the times you have one measurement of a square and need a different one, which happens more often than the rectangle page's two-in-three-out shape suggests. The commonest case is knowing the area and needing the side: a room quoted at 36 square metres is a square six metres on a side, a plot of 500 square metres is about 22.36 metres across, and a tin of paint covering a stated area tells you how long a wall it will do. The second commonest is the diagonal, and it is the one people forget they can ask for. A square tablecloth for a round table is measured by its diagonal; a square sheet of material being fitted through a rectangular opening goes through on its diagonal and not on its side; a square screen quoted at 32 inches is quoted across the diagonal, so its actual sides are 32 divided by the root of two, about 22.6 inches. And going the other way, the diagonal is how you check that a square really is one: if the four sides match but the two diagonals do not, you have a parallelogram or a bent frame rather than a square.

Worked examples

  1. A side of 5

    1. Perimeter: 4 × 5 = 20
    2. Area: 5 × 5 = 25
    3. Diagonal: 5 × √2 = 7.0710678…, which rounds to 7.0711

    The input the page loads with, and the row that matches the rectangle page's 5 by 5 exactly — 25 square centimetres, 20 centimetres around, a diagonal of 7.0711. Two pages, one number, and it is the same number on purpose: a square is a rectangle with equal sides, so any disagreement between them would be a bug in one of the two.

  2. From a perimeter of 20

    1. Side: 20 ÷ 4 = 5
    2. Area: 5 × 5 = 25
    3. Diagonal: 5 × √2 = 7.0710678…, which rounds to 7.0711

    The same square entered from a different direction, and the four readings come back identical to the row above — which is the point of the page rather than a duplication in the table. If you are buying a frame and know only the total length of moulding, this is the entry that answers the question, and the side, the area and the diagonal all come out of it.

  3. From an area of 25

    1. Side: √25 = 5
    2. Perimeter: 4 × 5 = 20
    3. Diagonal: 5 × √2 = 7.0710678…, which rounds to 7.0711

    The third way into the same square. This is the entry to reach for when the number you have is a measurement of surface — a room quoted at 25 square metres, or a piece of board sold by area — because the square root of 25 is exactly 5 and the page takes it from there.

  4. An area of 2

    1. Side: √2 = 1.4142135…, which rounds to 1.4142
    2. Perimeter: 4 × √2 = 5.6568542…, which rounds to 5.6569
    3. Diagonal: √2 × √2 = 2

    The row worth remembering. A square with an area of 2 has a side of 1.4142 — the square root of two, which is the whole reason that number is famous — and a diagonal of exactly 2, because the side is the root of two and the diagonal is the side times the root of two, and the two roots cancel out. It is also the square that doubles a given square's area: this one is twice the size of the unit square, and its side is the diagonal of the unit square, which is the construction behind the first irrational number anyone ever wrote down.

  5. A side of zero

    1. Perimeter: 4 × 0 = 0
    2. Area: 0 × 0 = 0
    3. Diagonal: 0 × √2 = 0

    A square with no size is a single point, and all four readings are zero. Zero is a legal input rather than an empty box, so a row of zeros is a real answer — the page distinguishes it from leaving all three boxes blank, which shows no result at all because there is nothing to work from.

Limitations

The page is for squares only: four equal sides and four right angles. A rectangle that is nearly a square is a different shape with a different diagonal, and the rectangle page next door is where that is handled; a rhombus has four equal sides but its corners are not right angles, so its diagonal is shorter than the side times the root of two and this page will not tell you that. The readings are in centimetres and square centimetres whatever unit the dropdown is set to, so a side entered in inches comes back as a centimetre answer you have to convert yourself. Four decimal places is a display width rather than a claim about precision: the perimeter is exact whenever the input is, the diagonal almost never is because it carries a √2, and an area entered as a number that is not a perfect square comes back as a side with the same problem. The diagonal is printed but cannot be entered — it has no box — so a square specified by its diagonal has to be converted by hand first. Supplying two of the three boxes at once is rejected rather than silently resolved, because a side of 5 and a perimeter of 30 describe two different squares and the page would rather say so than pick one. Nothing here handles a square with rounded corners, a square drawn on a curved surface, or the thickness of a square tile or bar.

Frequently asked questions

Why does only one box need filling in?
Because a square has only one degree of freedom. Every square is the same shape at a different size, so a single number saying how big it is settles everything else about it — unlike a rectangle, which comes in different proportions and needs two numbers before anything can be worked out. The page therefore accepts whichever measurement you happen to have and derives the rest.
Why is there no box for the diagonal?
Because a diagonal is a consequence of the size rather than a way of specifying it. Adding a box for it would mean a fourth reverse formula — divide by the root of two to recover the side — for a quantity almost nobody measures directly. It is still printed, because it is the reading people most often want and least often expect, and it is the one used to check that a square really is square.
Why do the side, perimeter and area give the same four readings?
Because they describe the same square. Entering a side of 5, a perimeter of 20 and an area of 25 are three ways of saying the same thing, so all three produce a 5 centimetre side, a 20 centimetre perimeter, 25 square centimetres and a diagonal of 7.0711. The reference table shows the three entries as separate rows precisely so that this is visible rather than something you have to take on trust.
What is special about a square with an area of 2?
Its side is the square root of two, about 1.4142, and its diagonal is exactly 2. That works because the side is √2 and the diagonal is the side times √2, so the two roots cancel — an exact answer in a page where almost everything else carries a root that never ends. It is also the square that has twice the area of a one-by-one square, which makes its side the diagonal of the unit square, and that construction is how the first irrational number was noticed.
Can I put numbers in two boxes at once?
No, and the page rejects it rather than picking one. A side of 5 and a perimeter of 30 describe two different squares, and there is no honest way to decide which one you meant. Empty the other boxes before filling in the one you want — the page also distinguishes an empty box from a zero, so a square of side zero is a real answer while three blank boxes produce no result at all.
How is this different from the rectangle calculator?
The rectangle page takes two numbers and gives three answers; this page takes one number and gives four readings. The difference is the number of degrees of freedom, one against two, and it changes the shape of the form: the rectangle asks you for a length and a width, while this page asks for whichever single measurement you have. A square entered on the rectangle page gives the same area, perimeter and diagonal, so the two agree wherever they overlap.

References

Related calculators