Rectangle Calculator: Area, Perimeter, Diagonal

Find a rectangle's area, perimeter, and diagonal from two sides, an area, a perimeter, or a diagonal paired with one side — with exact step-by-step results.

Loading calculator…

The three rectangle formulas

A rectangle has four right angles, with opposite sides equal in length. Given both sides aa and bb, every other measure follows directly:

A=abP=2a+2bp=a2+b2A = ab \qquad P = 2a + 2b \qquad p = \sqrt{a^2 + b^2}

The diagonal formula comes straight from the Pythagorean theorem: the diagonal is the hypotenuse of a right triangle whose two legs are the sides aa and bb, so p=a2+b2p = \sqrt{a^2 + b^2}.

Tip: The diagonal is never simply "a + b." For a 3-4 rectangle, a+b=7a + b = 7 but the true diagonal is 9+16=25=5\sqrt{9 + 16} = \sqrt{25} = 5 — noticeably shorter.

Solving in the other direction

This calculator also works backward: give it one side plus any one of area, perimeter, or diagonal, and it solves for the missing side first, then derives the rest.

KnownSolve for the missing sideThen
Both sides a,ba, b— (already known)A=abA = ab, P=2a+2bP = 2a+2b, p=a2+b2p = \sqrt{a^2+b^2}
Area AA, side aab=A/ab = A/aP=2a+2bP = 2a+2b, p=a2+b2p = \sqrt{a^2+b^2}
Perimeter PP, side aab=(P2a)/2b = (P - 2a)/2A=abA = ab, p=a2+b2p = \sqrt{a^2+b^2}
Diagonal pp, side aab=p2a2b = \sqrt{p^2 - a^2}A=abA = ab, P=2a+2bP = 2a+2b

Worked example: sides a = 8, b = 6

A=8×6=48P=2(8)+2(6)=28p=64+36=100=10A = 8 \times 6 = 48 \qquad P = 2(8) + 2(6) = 28 \qquad p = \sqrt{64 + 36} = \sqrt{100} = 10

This is the classic 6-8-10 Pythagorean triple, so the diagonal comes out to an exact whole number.

Worked example: area A = 48, side a = 8

Dividing gives the missing side: b=48/8=6b = 48/8 = 6. From there, P=28P = 28 and p=10p = 10 — the same rectangle as above, just described by a different pair of known measures.

Tip: Not every whole-number rectangle has a whole-number diagonal. A 2-3 rectangle has area 6, perimeter 10, but diagonal 133.6056\sqrt{13} \approx 3.6056 — the radicand 13 has no square factor to pull out.

Worked example: perimeter P = 2, side a = 8

Here b=(216)/2=7b = (2 - 16)/2 = -7, a negative value — no rectangle can have side a=8a = 8 and perimeter as small as 2, since the perimeter must exceed 2a=162a = 16 just to leave room for a positive second side. This combination is geometrically impossible, not a rounding issue.

Common mistakes

  • Writing A=a+bA = a + b or P=abP = ab. Area is the product of the sides; perimeter is the sum of all four sides, i.e. 2a+2b2a + 2b.
  • Forgetting to square before adding. The diagonal is a2+b2\sqrt{a^2 + b^2}, not a+b\sqrt{a + b} or (a+b)(a+b).
  • Ignoring the degenerate case. When solving backward from a perimeter or diagonal, the resulting second side must be positive — a perimeter too small or a diagonal too short for the given side describes no real rectangle.

Where this shows up

  • Flooring, tiling, and land area: a rectangular room or plot's area determines material and cost.
  • Screens and displays: a diagonal measurement (like a TV's "55 inch" spec) combines with an aspect ratio to determine the actual width and height.
  • Construction: measuring both diagonals of a rectangular frame and checking they're equal (and match a2+b2\sqrt{a^2+b^2}) confirms the corners are truly square.

A rectangle generalizes the square (the special case a=ba = b) and specializes the parallelogram (the special case where every angle is 90°) — which is why its diagonal, unlike a general parallelogram's, always follows the clean Pythagorean formula.

Frequently asked questions

What are the formulas for a rectangle?
With sides aa and bb: area A=abA = ab, perimeter P=2a+2bP = 2a + 2b, and diagonal p=a2+b2p = \sqrt{a^2 + b^2}. Knowing any two of these (with at least one side) is enough to find the rest.
Why is the diagonal √(a²+b²) and not a + b?
The diagonal is the hypotenuse of the right triangle formed by the two sides. By the Pythagorean theorem, p = √(a² + b²) — a purely geometric relationship, not a simple sum of the sides.
How do I find the missing side if I know the area and one side?
Divide: b=A/ab = A/a. For example, an area of 48 with side a=8a = 8 gives b=48/8=6b = 48/8 = 6.
How do I find the missing side if I know the perimeter and one side?
Use b=(P2a)/2b = (P - 2a)/2. A perimeter of 28 with side a=8a = 8 gives b=(2816)/2=6b = (28 - 16)/2 = 6. If this comes out zero or negative, the perimeter is too small for that side — no rectangle exists.
How do I find the missing side if I know the diagonal and one side?
Use b=p2a2b = \sqrt{p^2 - a^2}. A diagonal of 10 with side a=8a = 8 gives b=10064=36=6b = \sqrt{100 - 64} = \sqrt{36} = 6. The diagonal must be strictly greater than the given side, or the square root is undefined.
Is the diagonal always a whole number when the sides are whole numbers?
No. A 6-8-10 rectangle has an exact whole-number diagonal (a Pythagorean triple), but a 2-3 rectangle's diagonal is 133.6056\sqrt{13} \approx 3.6056 — an irrational number that only simplifies to a whole number for specific side combinations.
What is the most common mistake with rectangle formulas?
Confusing area and perimeter — computing A=a+bA = a + b or P=abP = ab instead of A=abA = ab and P=2a+2bP = 2a + 2b. Another common slip is forgetting to square both sides before adding them under the diagonal's square root.
How is the rectangle related to the square and parallelogram?
A square is the special case of a rectangle where a=ba = b. A rectangle is itself the special case of a parallelogram where all four angles are right angles — it inherits the parallelogram's area formula, simplified because the height equals the adjacent side.

Related calculators