Calculators & Converters

Rectangle Calculator

Find a rectangle’s missing side and compare area, perimeter, diagonal, and width-to-height ratio. Supply a known width with either height, diagonal, area, or perimeter. The tool assumes four exact right angles and shows the diagonal on a proportional drawing.

Free online tool

Loading tool…

Rectangle Calculator inputs

Changing the unit relabels the numbers. Convert measurements to one common unit before entering them.

Use one known side width w and one additional measurement. Area input is in square units. A diagonal must exceed the known side. Positive measurements must be from 0.000000001 to 1,000,000,000; derived defining lengths must also remain in this range.

Calculated measurements

Area
48 units²
All calculated values
MeasurementValue
Area48 units²
Perimeter28 units
Width8 units
Height6 units
Diagonal10 units
Width ÷ height1.333333333
width whdiagonal d
Rectangle and diagonal shown in proportion to the entered sides.

Formula: A = wh; P = 2(w + h); d = √(w² + h²)

Four right angles are assumed. Width is the side you choose; it need not be the longer side.

Results use full floating-point precision internally and display up to 10 significant digits. Angles are in degrees.

Calculations run locally in your browser. Measurement values are not sent to a calculation service. The downloadable text contains your selected inputs and computed results.

GET STARTED

How to use the Rectangle Calculator

  1. 01

    Choose the known measurement to pair with width.

  2. 02

    Enter width and height, diagonal, area, or perimeter as labeled.

  3. 03

    Use one common unit; area inputs use its square.

  4. 04

    Review the recovered height, diagram, and results before copying or downloading.

Examples

Direct side measurements

Width 8 and height 6 give area 48 square units, perimeter 28 units, and diagonal 10 units. The width-to-height ratio is 4/3.

A diagonal identifies the missing side

Width 12 and diagonal 13 give height 5. Entering a diagonal smaller than 12 cannot describe this rectangle and is rejected.

A perimeter constraint

Width 9 and perimeter 30 give height 6 and area 54. Perimeter is the sum of all four edges, not just width plus height.

Width is a naming choice

Any adjacent pair of rectangle sides can be called width and height. Width need not be the longer side, and rotating the rectangle does not change area, perimeter, or diagonal. The reported ratio follows your labels, so swapping sides changes width/height to its reciprocal.

Four ways to determine height

With width w and height h, area is wh and perimeter is 2(w + h). Thus a known area gives h = A/w and a known perimeter gives h = P/2 − w. With diagonal d, the Pythagorean relation gives h = √(d² − w²). Each route must leave a positive height.

Area and perimeter answer different questions

Area measures the enclosed flat region in square units. Perimeter measures the boundary in linear units. Rectangles with the same area can have different perimeters, and a fixed perimeter can enclose different areas. A long thin rectangle demonstrates this clearly: its area may be modest while its boundary is long.

Read the diagonal as a separate length

The diagonal connects opposite corners through the interior. It is longer than either side and can help check a rectangular layout. The calculator assumes the corners already are right angles; entering two sides does not establish that a measured quadrilateral is rectangular. It also does not include material waste, border widths, or tolerances.

What to know

  • Ideal rectangles only; the input does not verify physical corner angles.
  • Raw measurements and derived height must fit the stated numeric bounds.

Common questions

Can the rectangle be a square?

Yes. Equal width and height give a square. The diagonal then equals the side multiplied by √2.

Why did perimeter mode fail?

The perimeter must exceed twice the known width; equality would give zero height. Blank or out-of-range inputs also trigger validation.

Is width-to-height a reduced integer ratio?

It is a decimal quotient. The separate Aspect Ratio Calculator can reduce whole-number dimensions to a ratio.

Can I calculate an irregular quadrilateral?

No. These formulas assume opposite sides are equal and all four angles are 90°.

Sources & references