Rectangle Calculator
Calculate a rectangle’s area, perimeter and diagonal from its length and width, plus its aspect ratio in lowest terms. Includes a square mode, a proportional labelled diagram, formula working and a custom unit label.
Calculate a rectangle’s area, perimeter and diagonal from its length and width, plus its aspect ratio in lowest terms. Includes a square mode, a proportional labelled diagram, formula working and a custom unit label.
Rectangle Calculator takes a length and a width and returns the area, the perimeter, the diagonal and the shape’s proportions. The diagonal uses the Pythagorean theorem, √(length² + width²), and the working is shown with your numbers.
The aspect ratio is given in lowest whole-number terms when your sides have up to six decimal places (for example 1920 × 1080 becomes 16 : 9), alongside the decimal length-to-width ratio. Square mode uses one side for both dimensions. The diagram is drawn in proportion, and a text description is included for screen readers. Lengths use your unit label and the area uses the squared unit.
With the Pythagorean theorem: diagonal = √(length² + width²). For a 3 × 4 rectangle that is √(9 + 16) = 5.
They describe the same proportion. The aspect ratio is written as two whole numbers in lowest terms, such as 16 : 9; the length-to-width ratio is the single decimal value length ÷ width, such as 1.7778.
A lowest-terms ratio is only exact when both sides have at most six decimal places. Otherwise the tool shows the decimal ratio instead of inventing a misleading whole-number one.
It hides the width and uses the single side value for both length and width, so the area is side² and the diagonal is side × √2.
Positive numbers greater than zero up to 1,000,000,000. Empty, negative, zero and malformed values are rejected with a clear message.
No. The unit label is text only: it is attached to lengths, with ² for areas and ³ for volumes, so the results read correctly. Enter every measurement in the same unit. To change units, convert the inputs first, for example with the Unit Converter.
The tool uses standard double-precision arithmetic (about 15–16 significant digits) and the full-precision value of π. Results are then rounded to the decimal places you choose, so the last shown digit is rounded and a value computed from rounded figures by hand can differ slightly. Very large or very small values are shown in exponent form.
No. Every calculation runs in your browser on your device. Inputs, settings and results are not uploaded and are not saved in browser storage. Reset clears them from the page.