Skip to calculator
Libre CalculatorThe universe in numbers

Rectangle calculator

Area, perimeter or diagonal of a rectangle from its width and height.

Calculation

Answer

20 m²

Steps

A = w × h = 5 m × 4 m = 20 m²

The shaded region is the area
A rectangle 5 m wide and 4 m high has an area of 20 m².

Watch the explainer

190 seconds · 9 chapters · captions included

0:00 / 3:10Same skirting, twice the floor?

Explanation

Rectangle measurements

Find a rectangle’s area, the full length of its boundary, or the diagonal joining opposite corners. All operations use the same two perpendicular side measurements in metres.

A = w × h

Variables
wWidth (m)
hHeight (m)

Area of a 3 m by 4 m rectangle

Width3
Height4
Result12 m²

A = w × h = 3 m × 4 m = 12 m²

P = 2(w + h)

Variables
wWidth (m)
hHeight (m)

Perimeter of a 3 m by 4 m rectangle

Width3
Height4
Result14 m

P = 2(w + h) = 2 × (3 m + 4 m) = 14 m

d = √(w² + h²)

Variables
wWidth (m)
hHeight (m)

Diagonal of a 3 m by 4 m rectangle

Width3
Height4
Result5 m

d = √(w² + h²) = √(3² + 4²) m = 5 m

Diagram of this result

The rectangle is drawn in the proportions you entered, with width and height on dimension lines. The shaded region, the heavy outline or the corner-to-corner line marks the area, perimeter or diagonal.

The rectangle is drawn in the proportions you entered, with width and height on dimension lines. The shaded region, the heavy outline or the corner-to-corner line marks the area, perimeter or diagonal.

Common mistakes

Area counts a flat region in m²; perimeter measures the boundary in m. The diagonal is a straight shortcut between opposite corners and differs from walking along two sides. Do not apply these formulas to a slanted parallelogram.

Assumptions and limits

A Euclidean rectangle has four right angles. Width and height must be positive. Area and perimeter use product/sum arithmetic; diagonal uses the square root of w²+h² and is approximate at finite decimal precision. Canonical inputs are limited to 30 significant digits, 256 characters and adjusted exponent magnitude 100. Computation uses 50 significant digits without intermediate presentation rounding; output overflow fails explicitly. Approximate fixtures use absolute tolerance 1e-12 plus relative tolerance 1e-12.

How do the three measurements relate?

With sides 3 m and 4 m, area is 12 m², perimeter is 14 m and diagonal is 5 m. If both sides double, area becomes 48 m² while perimeter becomes 28 m.

Sources

Standard Euclidean measurement formulas: OpenStax Prealgebra 2e, measurement and geometry topics, https://openstax.org/details/books/prealgebra-2e. Worked examples use independent geometric identities.