What is the diagonal of a rectangle?
The diagonal of a rectangle is the straight line joining two opposite corners, and it cuts the rectangle into two identical right-angled triangles. Its length is the longest straight line that fits inside the rectangle, which is why it matters for screens, doors, tables and rooms: a television is sold by its diagonal, a door must be wide enough for the diagonal of a table, and a ladder must fit the diagonal of a stairwell. The diagonal is always longer than either side, and shorter than the sum of the two sides.
This calculator finds the diagonal from the length and width, and it also shows the area and the perimeter. For the right-angled triangle that the diagonal creates, a Pythagorean theorem calculator covers the same theorem in its general form.
Your figures stay on your own device because the whole calculation happens in the browser. Nothing is uploaded, nothing is stored, and there is no account to create. That makes it safe to try realistic numbers, including the ones you would not want to paste into a random website. It also means the tool works the same way on a phone, a tablet or a computer, with nothing to install.
How the diagonal is calculated
The diagonal is found with the Pythagorean theorem: the square of the diagonal equals the square of the length plus the square of the width. Take the square root of that sum, and you have the diagonal. The theorem works because the diagonal is the hypotenuse of the right-angled triangle formed by the two sides, and the right angle is the corner of the rectangle.
The length is the longer side of the rectangle and the width is the shorter side, although the calculator works either way, because the formula adds the squares and the order does not matter. Both must be measured in the same unit, and the answer comes out in that unit. If you measured in inches, the diagonal is in inches; if you measured in centimetres, it is in centimetres.
The diagonal is the headline number, in the same unit as the inputs, and it is the longest line inside the rectangle. The area is the length times the width, in square units, and the perimeter is twice the length plus the width, in the same unit as the inputs. The three numbers together describe the rectangle completely.
The results are rounded for display, usually to two decimal places, while the calculation itself keeps full precision. That means a figure shown as 12.41 percent may be 12.405 percent underneath, and using the displayed figure in a further calculation can introduce a small rounding difference. For most purposes the displayed figure is exact enough, but if you need more precision, work from the unrounded inputs rather than from the rounded outputs.
The length and width, explained
The length and width are the two sides of the rectangle, and the diagonal depends on both of them through their squares. That means a small change in the longer side changes the diagonal more than the same change in the shorter side. A rectangle 8 cm by 6 cm has a diagonal of 10 cm, and lengthening the 8 cm side to 9 cm moves the diagonal to about 10.82 cm, while widening the 6 cm side to 7 cm moves it to about 10.63 cm.
The 8 by 6 rectangle is a scaled 3-4-5 triangle, which is the most famous Pythagorean triple. Its diagonal is exactly 10, with no rounding, because 6 squared plus 8 squared is 100, and the square root of 100 is 10. Other triples work the same way: 5 by 12 gives a diagonal of 13, and 9 by 12 gives 15. When the sides are not a triple, the diagonal is usually an awkward decimal, and the calculator gives it to two places.
Doubling both sides doubles the diagonal, because the formula is homogeneous: scaling the rectangle scales every length in it by the same factor. That makes it easy to check a result: a rectangle twice as large in both directions must have twice the diagonal, twice the perimeter, and four times the area.
A worked example: a rectangle 8 cm by 6 cm
Take a rectangle with a length of 8 cm and a width of 6 cm. This could be a small picture frame, a book cover, or a phone screen measured in centimetres.
Square the length, 8 squared is 64, and square the width, 6 squared is 36. Add them to get 100, and take the square root to get a diagonal of 10.00 cm. The area is 8 times 6, which is 48.00 square centimetres, and the perimeter is twice 8 plus 6, which is 28.00 cm.
A diagonal of 10.00 cm is the longest straight line that fits in the rectangle, and it is the measurement a shop would use to describe a screen of this size. The area of 48.00 square centimetres is the amount of material in the rectangle, and the perimeter of 28.00 cm is the length of edging needed to go around it.
Who uses the rectangle diagonal
Screen buyers use it constantly, because televisions, monitors, laptops and phones are all sold by their diagonal size. A 55-inch television has a diagonal of 55 inches, and its width and height depend on the aspect ratio: a 16 by 9 screen of that diagonal is about 48 inches wide and 27 inches tall.
Carpenters and builders use it to check that a frame is square. If the two diagonals of a frame are equal, the corners are right angles, and the frame is a true rectangle. If they differ, the frame is skewed, and the builder adjusts it until the diagonals match. The same check works for doors, windows and foundations.
Movers use it to work out whether furniture fits through a door or up a staircase. A table that is too wide for a door can often be carried through diagonally, because the diagonal of the doorway is longer than its width. A triangle area calculator is the tool for the triangular part of that calculation.
The calculator is only as good as the numbers you type into it. A rate from last month, a measurement taken roughly, or a unit entered wrongly will all give a confident-looking answer that is simply wrong. The best habit is to enter the numbers twice, from two sources, and to check that the answer makes sense before you act on it. A result that surprises you is usually a sign to recheck the inputs, not to trust the surprise. For a related calculation, the distance calculator covers the next number most people need after this one.
Rectangle diagonal vs screen size
The diagonal of a rectangle and the size of a screen are the same measurement, but they are used differently. The diagonal of a rectangle is a geometric fact, found from the length and width. The size of a screen is a marketing label, which is the diagonal rounded to a whole number of inches, and it does not tell you the width or the height on its own.
To get the width and height from a screen size, you need the aspect ratio as well. A 55-inch 16 by 9 screen is about 48 inches wide, while a 55-inch 4 by 3 screen would be 44 inches wide and 33 inches tall. The diagonal alone does not fix the shape, which is why this calculator asks for the length and width, and gives the diagonal, rather than the other way round.
Neither tool replaces the other. Pick the one that answers the exact question you have, and if the question changes halfway through, switch tools rather than forcing the first one to fit. The two tools are designed to be used together, each answering the part of the question it was built for.
Common mistakes with rectangle diagonals
The first is adding the sides instead of using the Pythagorean theorem, which gives a diagonal that is too long. The second is forgetting the square root, which gives the square of the diagonal instead of the diagonal itself.
The third is using the diagonal as a side in the same formula, which mixes the hypotenuse with a leg. The fourth is mixing units, such as a length in inches and a width in centimetres.
Check your answer in two ways: the diagonal must be longer than either side, and shorter than the sum of the two sides. If it falls outside that range, the calculation is wrong. For a quick check, a square with side 1 has a diagonal of about 1.414, which is the square root of 2.
How to use this rectangle diagonal calculator
To use it, enter length; enter width, then read the results box at the top. The main result is highlighted, and the other rows give the supporting figures. If an answer looks wrong, check the inputs first: a misplaced decimal or a wrong unit is the usual cause, not the formula.
Enter the length and the width in the same unit, and read the diagonal, the area and the perimeter. If you are checking a screen, remember that the advertised size is the diagonal, rounded to the nearest inch. If you are checking a frame for squareness, measure both diagonals and compare them, rather than using this calculator.
No data leaves your device: the maths runs entirely in your browser, with no sign-up and no server round-trip. You can change a number, see the answer move, and change it back, all instantly. It is a private way to check a figure before you talk to a professional about it. The page has no tracking of the numbers you enter, and closing the tab leaves nothing behind.