Home · Math · Plane Geometry · Dimensions of a Rectangle Calculator

Dimensions of a Rectangle Calculator

Recover a rectangle's length and width when you know only its area and perimeter.

Your figures

Example result — edit the figures to make it yours

6

Length (longer side)

Width (shorter side)4.00

6 4 Rectangle · 6 × 4
The shape for your figures, drawn and labelled from the same values the result is computed from — change a figure and the drawing follows.

What this calculator does

Recover a rectangle's length and width when you know only its area and perimeter. Every figure on this page is computed from the formula or definition stated below, with no hidden rounding steps, and the method notes name the exact convention where more than one exists.

The formula and method

L, W = (P/2 +- sqrt((P/2)^2 - 4A)) / 2

Length and width are the two roots of t^2 - (P/2) t + A = 0, since L + W = P/2 and L x W = A. The larger root is reported as the length.

A real rectangle exists only when (P/2)^2 >= 4A - for a given perimeter the square encloses the most area, so an area above (P/4)^2 has no solution.

Worked example

With the example inputs this page opens with (area 24, perimeter 20), the result is 6.00 — length (longer side). Change any figure and the result updates with the same formula.

Quick reference

Quick reference — varying area
AreaLength (longer side)
128.61
19.27.41
246.00
255.00

Computed with the same formulas as the calculator above — enter any values there for figures beyond this table.

Common questions

How does the Dimensions of a Rectangle Calculator work?

Recover a rectangle's length and width when you know only its area and perimeter. Area - Perimeter -> Length. The result updates as you type, and the formula and method on this page state the exact definitions used, so you can reproduce the calculation by hand.

What inputs does the Dimensions of a Rectangle Calculator need?

Area - Perimeter -> Length. Invalid entries — such as a zero denominator, an out-of-range value or a malformed list — produce a plain-language message instead of a misleading number.

Is the Dimensions of a Rectangle Calculator free to use?

Yes. It runs entirely in your browser with no sign-up, and the same calculator is available as an embeddable widget via the Embed button, so it can be placed on another site with its calculation intact.