Rectangle Area and Perimeter Calculator

Rectangle Area and Perimeter Calculator

Growing AI Skill PRO
Rectangle
RectangleRectanglew = 2h = 1ABCDA = 2
Worked stepsStep 2 of 2

Area A=w⋅hA = w \cdot h, perimeter P=2(w+h)P = 2(w + h), diagonal d=w2+h2d = \sqrt{w^2 + h^2}

Download figure
Figure data
Width2
Height1
Area2
Perimeter6
Rectangle in the Library: formulas and every calculator

Enter Calculation

Formula

A=Width a×Height bP=2×Width a+2×Height b\begin{gathered} A = {{\text{Width } a}} \times {{\text{Height } b}} \\[1em] P = 2 \times {{\text{Width } a}} + 2 \times {{\text{Height } b}} \end{gathered}
Usage stats

Advertisement

Results

Area S
2
square units (unit²)
Perimeter L 6 units

Report an error on this page

What this calculator does

This tool computes the area and perimeter of a rectangle from its two side lengths: the width a and the height b. A rectangle is a four-sided shape with four right angles, where opposite sides are equal in length. Both the area and perimeter follow directly from these two measurements, so no other input is needed.

How to use it

Enter the width and the height using the same length unit for both — for example centimeters, meters, or inches. There is no unit dropdown because the formulas are unit-consistent: whatever length unit you supply, the perimeter comes out in that unit and the area comes out in that unit squared (cm², m², in², and so on). Negative values are not valid lengths; if you enter one it is treated as its absolute value.

The formulas explained

The area is simply the product of the two sides: \(S = a \times b\). Imagine tiling the rectangle with unit squares — there are a columns and b rows, giving \(a \times b\) squares. The perimeter is the total distance around the edge. Since a rectangle has two sides of length a and two of length b, the perimeter is \(L = 2a + 2b\), which can be written more compactly as \(L = 2(a + b)\).

Advertisement
Rectangle with width a and height b, shaded interior
A rectangle defined by its width a and height b.

Worked example

Suppose a = 5 and b = 3 (in any single unit). The area is $$S = 5 \times 3 = 15$$ square units. The perimeter is $$L = 2 \times 5 + 2 \times 3 = 10 + 6 = 16$$ units. For the default values a = 2 and b = 1, the area is 2 and the perimeter is 6.

Left rectangle filled with unit squares for area, right rectangle with highlighted edges for perimeter
Area counts the unit squares inside; perimeter sums the four edges.

Area and Perimeter for Different Rectangle Shapes

Rectangles with the same perimeter can enclose very different areas. The table below keeps the perimeter fixed at 24 units (any length unit, with area in that unit squared) and changes only the proportions of the sides.

Width Height Perimeter Area Shape
0.5 11.5 24 5.75 Very long and thin
1 11 24 11 Long and thin
2 10 24 20 Elongated
4 8 24 32 Moderate
6 6 24 36 Square

Contrast the extremes: the long thin 1 × 11 rectangle encloses only 11 square units, while the 6 × 6 square encloses 36 square units, over three times as much, using exactly the same amount of boundary.

Why the square wins. If the perimeter is 24, then \(a + b = 12\), so \(b = 12 - a\) and the area is \(A = a(12 - a)\). This expression is largest when \(a = 6\), giving \(b = 6\) and \(A = 6 \times 6 = 36\). In general, for a given perimeter the square has the maximum area among all rectangles.

Advertisement

Area Unit Conversions

Use these factors to convert the area result into another unit. They are exact or rounded to the digits shown.

From Equivalent values
1 m² 10,000 cm² = 1,550.0031 in² = 10.7639 ft² = 1.19599 yd²
1 ft² 144 in² = 0.092903 m²
1 in² 6.4516 cm²
1 yd² 9 ft² = 0.836127 m²

Important: area units are squared, so linear conversion factors must be squared too. Since 1 in = 2.54 cm, then \(1\ \text{in}^2 = 2.54^2\ \text{cm}^2 = 6.4516\ \text{cm}^2\). Likewise, 1 ft = 12 in gives \(1\ \text{ft}^2 = 12^2 = 144\ \text{in}^2\), and 1 yd = 3 ft gives \(1\ \text{yd}^2 = 3^2 = 9\ \text{ft}^2\).

Tip: enter both sides in the same unit, or convert the sides first, before computing the area. Perimeter is a length, so it converts with the ordinary (unsquared) linear factor.

FAQ

What if width equals height? Then the rectangle is a square: the area is \(a^2\) and the perimeter is \(4a\).

What happens if one side is zero? The area becomes 0 (a degenerate rectangle, effectively a line segment), while the perimeter still equals \(2a + 2b\).

Do I need to convert units? No. Just use the same length unit for both sides. The result inherits that unit automatically — area in unit squared, perimeter in the same unit.

Last updated:

Most popular in Geometry

View all Geometry calculators