We can **calculate the diagonal of a square** as of Pythagorean theorem thanks to which, we know that the hypotenuse squared is equal to the sum of the square of the legs.

Since it is a square, leg 'a' and leg 'b' have the same length since, as you know, this geometric figure has four exactly equal sides. Therefore, **from the formula of Pythagoras' theorem** and the length of the side of the square, we can find its diagonal:

Article sections

## Formula for calculating the diagonal of a square

If you are still not sure **how to calculate the diagonal of a square**In the following you will find the mathematical formula that will allow you to solve this problem:

d = √2-a

Where 'd' is the diagonal of the square and 'a' is the value of one of the sides.

How did we arrive at this mathematical formula that allows us to calculate the diagonal? We have simply developed the formula of the Pythagorean Theorem taking into account that the legs are equal. Therefore, **the demonstration would be as follows**:

d

^{2}= a^{2}+ a^{2}= 2a^{2}

We clear the unknown to get the diagonal and simplify::

d = √(2a

^{2}) = √2-a

## Example of how to calculate the diagonal of a square:

To understand the formula seen in the previous point, let's look at a practical example.

If we have a **square whose side measures 5 centimeters**then we have that the diagonal is equal to:

d² = 5² + 5² = 50

We take the square root of 50 to clear the unknown (d) and obtain that **the diagonal of the square measures** 7.07 centimeters.

Remember that you can save all these calculations with the tool you have above these lines, and that **automatically calculates the length of the diagonal** of a square. Just enter how long the side of the figure is, click on the calculate button and you will automatically get the result you are looking for.

## How long are the sides of a square from its diagonal?

Now we can pose the problem in the opposite way, i.e., we are asked for **calculate how long the sides of the triangle measure from the diagonal**.

For this, we resort again to the Pythagorean Theorem whose starting formula was this:

d

^{2}= a^{2}+ a^{2}= 2a^{2}

Since we have to clear the unknown 'a', we are going to move terms to achieve them:

d

^{2}/2 = a^{2}

Finally, we are left with the formula as follows

d/√2 = a

That is, we have to divide the diagonal of the square by the square root of 2 and the result obtained will tell us **how long the sides of the square are**.