Rectangle Calculator
Enter any rectangle's width and height to instantly find its area, perimeter, diagonal, and aspect ratio. Square mode included.
Last updated: March 2026
Rectangle Formulas
A rectangle is a quadrilateral with four right angles and opposite sides equal. Given width w and height h:
- Area: A = w × h
- Perimeter: P = 2(w + h)
- Diagonal: d = √(w² + h²) — from the Pythagorean theorem
- Aspect Ratio: w : h (simplified)
For a square (w = h = s): Area = s², Perimeter = 4s, Diagonal = s√2 ≈ s × 1.414.
The Diagonal — Pythagorean Theorem Applied
When you draw a diagonal across a rectangle, it divides the shape into two congruent right triangles. The width is one leg, the height is the other leg, and the diagonal is the hypotenuse. This means:
diagonal = √(w² + h²)
For a 3 × 4 rectangle: diagonal = √(9 + 16) = √25 = 5 — the famous 3-4-5 right triangle. Both diagonals of a rectangle are equal in length and bisect each other at the center.
You can use the diagonal formula in reverse: if you know the diagonal d and one side w, the other side h = √(d² − w²).
Special Rectangles
The Square
A square is a rectangle with all four sides equal. It has the maximum area for a given perimeter among all rectangles. Its diagonal is always side × √2, and both diagonals bisect each other at 90° (unlike general rectangles where the diagonals bisect at other angles).
The Golden Rectangle
A golden rectangle has sides in the ratio 1 : φ where φ = (1 + √5) / 2 ≈ 1.618 (the golden ratio). It is renowned for its visual harmony and appears in classical Greek architecture, Renaissance art, and the proportions of credit cards and A4 paper (approximately). If you cut a square from a golden rectangle, the remaining rectangle has the same proportions.
Standard Screen Ratios
Modern screens use well-known aspect ratios: 16:9 (widescreen HD), 4:3 (classic TV), 21:9 (ultra-wide), 1:1 (square, Instagram). Aspect ratio describes proportions but not size — a 1920×1080 and a 3840×2160 screen both have a 16:9 ratio.
Real-World Applications
- Flooring and rooms: Area tells you how many square feet of flooring, carpet, or tile to buy.
- Fencing and borders: Perimeter tells you how much fencing to enclose a yard or how much trim for a picture frame.
- Screen sizes: Screen diagonal (e.g., "65-inch TV") is the diagonal of the display rectangle.
- Land parcels: Area in acres: 1 acre = 43,560 sq ft. A 200 ft × 218 ft plot ≈ 1 acre.
- Construction: Wall area for painting or siding, window openings, door clearances.
- Photography: Sensor crop factors and print sizes use aspect ratios and area.
How to Calculate Rectangle Measurements If...
How to find the area of a 12 ft × 16 ft room?
Area = 12 × 16 = 192 square feet. This is how much flooring you would need (plus a few percent for waste).
How to find the diagonal of a 6 × 8 rectangle?
Diagonal = √(6² + 8²) = √(36 + 64) = √100 = 10 units. This is the 6-8-10 Pythagorean triple.
How to find the perimeter of a 5 × 9 rectangle?
Perimeter = 2 × (5 + 9) = 28 units.
How to find the side of a square with area 144?
Side = √144 = 12 units. For squares, take the square root of the area.
How to find the width if you know area and height?
Width = Area / Height. If area = 80 and height = 5, then width = 80 / 5 = 16 units.
How to find the diagonal of a square with side 10?
Diagonal = 10 × √2 ≈ 14.14 units. For squares, multiply the side by √2.
How to find the aspect ratio of a 1920 × 1080 rectangle?
GCD(1920, 1080) = 120. Ratio = 1920/120 : 1080/120 = 16:9.
How to find the perimeter of a square with area 64?
Side = √64 = 8. Perimeter = 4 × 8 = 32 units.
People Also Search For
How to calculate the area of a rectangle in square meters?
Measure length and width in meters, then multiply. A 5 m × 8 m room = 40 m². The formula is the same regardless of unit — just ensure both measurements use the same unit.
Rectangle vs parallelogram — what is the difference?
A rectangle is a parallelogram with right angles. All rectangles are parallelograms, but parallelograms can have non-90° angles. Rectangles have equal diagonals; general parallelograms do not.
How to find the length of a rectangle given area and width?
Length = Area / Width. This is a simple rearrangement of Area = Length × Width.
What is the diagonal of a square?
The diagonal of a square with side s is s√2. This comes directly from the Pythagorean theorem: √(s² + s²) = s√2. A unit square has diagonal √2 ≈ 1.414.
How to find the area of a rectangle with only the diagonal and one side?
Find the missing side: h = √(d² − w²). Then Area = w × h. For diagonal 13 and width 5: h = √(169 − 25) = √144 = 12. Area = 5 × 12 = 60.
How many square feet in an acre?
1 acre = 43,560 square feet. A rectangle that is 660 ft × 66 ft (a furlong by a chain) is exactly 1 acre.
Frequently Asked Questions
What is the area formula for a rectangle?
Area = width × height (A = w × h). Multiply the two side lengths together. The result is in square units of whatever unit you used.
What is the perimeter formula for a rectangle?
Perimeter = 2 × (width + height). Add the two different side lengths and multiply by 2 (since opposite sides are equal).
Is a square a rectangle?
Yes. A square is a special case of a rectangle where all four sides are equal. Every square satisfies the definition of a rectangle (four right angles, opposite sides equal).
How do I find the diagonal of a 5 × 12 rectangle?
Diagonal = √(5² + 12²) = √(25 + 144) = √169 = 13 units. This is the 5-12-13 Pythagorean triple.
What is the aspect ratio of a 16:9 screen?
16:9 means the width is 16 units for every 9 units of height (≈1.778 times wider than tall). This is the standard aspect ratio for HD and 4K television and most computer monitors.
What is the golden ratio and golden rectangle?
The golden ratio φ ≈ 1.618. A golden rectangle has width/height = φ. Cutting a square from it leaves another golden rectangle. It appears in art, architecture, and nature.
How is the diagonal formula derived?
The diagonal divides the rectangle into two right triangles with legs w and h. By the Pythagorean theorem: d² = w² + h², so d = √(w² + h²).
Can two rectangles have the same area but different perimeters?
Yes. A 4 × 9 rectangle (area 36, perimeter 26) and a 6 × 6 square (area 36, perimeter 24) have the same area but different perimeters. The square always has the minimum perimeter for a given area among all rectangles.
Does this calculator work for non-integer dimensions?
Yes. Enter any positive decimal value. For example, 2.5 × 4.7 gives area = 11.75, perimeter = 14.4, diagonal ≈ 5.32.
Is my data stored?
No. All calculations run entirely in your browser. No values are transmitted to any server.