Use this rectangle calculator to find area, perimeter, diagonal, and missing side lengths from width + height, area + width, perimeter + width.
Last updated
Rectangle calculator Use this rectangle calculator to solve from width and height, area and width, perimeter and width, or diagonal and width. It works as a rectangle area calculator, rectangle perimeter calculator, and rectangle diagonal calculator with reverse rectangle formulas built in.
Choose a workflow
Quick presets
12 by 9 rectangle
What this page solves
Area: width times height for the surface covered inside the rectangle.
Perimeter: 2(width + height) for the full outside edge.
Diagonal: sqrt(width^2 + height^2) from the Pythagorean theorem.
Extra checks: aspect ratio, circumradius, and the largest inscribed circle radius for layout and geometry interpretation.
Result
Rectangle dimensions, formulas, and reverse-workflow interpretation
Enter rectangle measurements Choose a rectangle workflow and enter the two known values to solve the remaining side, area, perimeter, diagonal, and ratio checks.
Rectangle calculator for area, perimeter, diagonal, and missing dimensions
Use this rectangle calculator to find area, perimeter, diagonal, and missing side lengths from several common starting points. It works as a rectangle area calculator, rectangle perimeter calculator, and rectangle diagonal calculator, and it also helps with reverse rectangle formulas when you know area plus one side, perimeter plus one side, or diagonal plus one side.
How this rectangle calculator works
A rectangle is defined by two perpendicular side lengths, often called width and height or length and width. Once those two dimensions are known, the other standard properties follow immediately: area, perimeter, diagonal, aspect ratio, and a few circle-based geometry checks.
This page goes further than a thin width-times-height tool. It supports direct solving from width and height, but it also works as a rectangle dimensions calculator when you start from area and width, perimeter and width, or diagonal and width. That makes it more useful for reverse homework problems, screen sizing, room sketches, and layout planning.
Rectangle formulas used on this page
The core rectangle formulas are straightforward. Area equals width multiplied by height. Perimeter equals twice the sum of width and height. Diagonal equals the square root of width squared plus height squared because the diagonal and two side lengths form a right triangle.
These three formulas cover the main search intents behind rectangle calculator, rectangle area calculator, rectangle perimeter calculator, and rectangle diagonal calculator. They also support reverse solving once one missing side can be recovered from the information you already know.
A = w * h
Area of a rectangle from width and height.
P = 2(w + h)
Perimeter of a rectangle. This is the specific relationship the calculator applies when building the result.
d = sqrt(w^2 + h^2)
Diagonal of a rectangle from the Pythagorean theorem.
Reverse rectangle formulas: recovering the missing side
Many users do not start with both side lengths. If you know area and one side, the missing side is area divided by the known side. If you know perimeter and one side, the missing side is half the perimeter minus the known side. If you know diagonal and one side, the missing side comes from the Pythagorean theorem: h = sqrt(d^2 - w^2).
Those reverse rectangle formulas matter for search intent such as rectangle dimensions calculator, find area and perimeter of rectangle, and calculate diagonal of rectangle. They also make the page more useful than a basic rectangle area and perimeter calculator that only accepts width and height.
h = A / w
Recover the missing side when area and width are known.
h = P/2 - w
Recover the missing side when perimeter and width are known.
h = sqrt(d^2 - w^2)
Recover the missing side when diagonal and width are known.
How to calculate the diagonal of a rectangle
Draw a line from one corner of a rectangle to the opposite corner and the shape splits into two congruent right triangles. The width and height become the legs, while the diagonal becomes the hypotenuse. That is why the diagonal of a rectangle formula comes straight from the Pythagorean theorem.
For a rectangle with width 8 and height 6, the diagonal is sqrt(8^2 + 6^2) = sqrt(100) = 10. For width 5 and height 3, the diagonal is sqrt(34), or about 5.83. This is the relationship behind searches like find the diagonal of a rectangle and calculate diagonal of rectangle.
Aspect ratio, circumradius, and the largest inscribed circle
Once the full rectangle dimensions are known, other helpful properties can be interpreted quickly. The aspect ratio compares the longer side to the shorter side, which is useful for screen panels, print layouts, and proportion checks. A near-1:1 ratio means the shape is close to a square, while a larger ratio means the rectangle is more elongated.
The diagonal also sets the circumradius because the smallest circle that passes through all four corners has radius equal to half the diagonal. The largest inscribed circle is limited by the shorter side, so its radius is half of that shorter side. These extra properties help the page outperform thin competitors that stop at area, perimeter, and diagonal alone.
Worked examples
For a rectangle with width 5 and height 3, the area is 15 square units, the perimeter is 16 units, and the diagonal is about 5.83 units. For a rectangle with width 12 and area 96, the missing height is 8, so the perimeter becomes 40 and the diagonal is about 14.42.
For a rectangle with width 8 and diagonal 10, the missing height is 6 and the rectangle is a balanced 4:3 case. These worked examples show why a rectangle calculator with reverse solving is more useful than memorising only one formula.
Width 5, height 3: area 15, perimeter 16, diagonal about 5.83
Width 12, area 96: height 8, perimeter 40, diagonal about 14.42
Width 8, diagonal 10: height 6, area 48, perimeter 28
Area units versus perimeter units
Area uses square units because it measures coverage inside the rectangle. If width and height are in metres, area is in square metres. Perimeter and diagonal stay in plain linear units because they describe distances rather than coverage.
This distinction is easy to overlook in classroom work and practical measurement. The same width and height can produce valid area, perimeter, and diagonal results, but each answer describes a different type of measurement.
Is a square a rectangle
Yes. A square is a special rectangle because it still has four right angles and opposite sides that are parallel. The difference is that all four side lengths are equal, so width and height match exactly.
That is why this rectangle calculator still works when the two side lengths are the same. In that case the aspect ratio becomes 1:1, the largest inscribed circle reaches its maximum size for that side length, and the usual rectangle formulas collapse to the square case.
When this rectangle calculator does not apply
This calculator assumes a true rectangle with four right angles. It does not solve irregular quadrilaterals, slanted parallelograms, rectangular prisms, coordinate-geometry rectangle proofs, or golden rectangle design problems. Those are adjacent topics, but they are not the same intent.
If the shape is three-dimensional, use a rectangular-prism or surface-area tool instead. If the shape is not guaranteed to have four right angles, use a shape-specific geometry calculator rather than forcing the rectangle formulas onto the wrong figure.
Multiply width by height. If a rectangle is 5 units wide and 3 units high, its area is 5 * 3 = 15 square units.
How do you calculate the perimeter of a rectangle?
Add width and height, then multiply by 2. For a 5 by 3 rectangle, the perimeter is 2(5 + 3) = 16 units.
How do you calculate the diagonal of a rectangle?
Use the Pythagorean theorem: diagonal = sqrt(width^2 + height^2). The diagonal is the hypotenuse of the right triangle formed by the rectangle's width and height.
How do you find the missing side of a rectangle from area and width?
Divide the area by the known width. If the area is 96 and the width is 12, the missing height is 96 / 12 = 8.
How do you find the missing side of a rectangle from perimeter and width?
Take half the perimeter, then subtract the known width. If the perimeter is 34 and the width is 8, the missing height is 34 / 2 - 8 = 9.
How do you find the missing side of a rectangle from diagonal and width?
Use the Pythagorean theorem in reverse: missing side = sqrt(diagonal^2 - width^2). This only works when the diagonal is longer than the known side.
What rectangle formulas does this calculator use?
It uses A = w * h for area, P = 2(w + h) for perimeter, and d = sqrt(w^2 + h^2) for the diagonal, plus reverse forms such as h = A / w, h = P/2 - w, and h = sqrt(d^2 - w^2).
What is the aspect ratio of a rectangle?
The aspect ratio compares the longer side to the shorter side. It helps describe the rectangle's overall shape, especially for screens, print layouts, and panels.
Is a square a rectangle?
Yes. A square is a special rectangle with four right angles and equal side lengths, so the rectangle formulas still apply.
Can this calculator solve a rectangular prism or an irregular quadrilateral?
No. It is only for flat, two-dimensional rectangles. Three-dimensional prisms and irregular quadrilaterals need different formulas and different calculators.