Rectangle Area Calculator
Enter the length and width of any rectangle — or just one side for a square — to get the area and perimeter with full step-by-step work.
Leave blank to calculate a square
Solution
Rectangle Formulas
A rectangle has four right angles and two pairs of equal sides. The longer dimension is usually called length ($l$) and the shorter is width ($w$).
$$\text{Area} = l \times w$$ $$\text{Perimeter} = 2l + 2w$$A square is a special rectangle where $l = w = s$, so:
$$\text{Area} = s^2 \qquad \text{Perimeter} = 4s$$Step-by-Step: Rectangle
A rectangle is 9 units long and 4 units wide.
Area:
$$A = l \times w = 9 \times 4 = 36\ \text{sq. units}$$Perimeter:
$$P = 2l + 2w = 2(9) + 2(4) = 18 + 8 = 26\ \text{units}$$Step-by-Step: Square
A square has a side length of 6.
$$A = s^2 = 6^2 = 36\ \text{sq. units}$$ $$P = 4s = 4 \times 6 = 24\ \text{units}$$Finding a Missing Side
If you know the area and one side, rearrange the formula:
$$l = \frac{A}{w} \qquad w = \frac{A}{l}$$If you know the perimeter and one side:
$$l = \frac{P - 2w}{2} \qquad w = \frac{P - 2l}{2}$$Diagonal of a Rectangle
The diagonal of a rectangle can be found with the Pythagorean theorem:
$$d = \sqrt{l^2 + w^2}$$Frequently Asked Questions
What is the difference between area and perimeter?
Area measures the space inside the rectangle (square units). Perimeter measures the distance around it (linear units).
What is a square?
A square is a rectangle with all four sides equal. All square formulas are special cases of the rectangle formulas with $l = w$.
What units should I use?
Use any consistent unit — inches, feet, centimeters, meters. Area will be in square versions of that unit (e.g., square feet), and perimeter in the same linear unit.