Calculate Rectangle Area from Length and Width
Use this form when you know both side lengths and need the enclosed area — flooring, fabric, roofing, or any rectangular surface.
A = l × w
Calculate Rectangle Perimeter from Length and Width
Use this form when you need the perimeter — fencing, baseboard trim, or framing material to surround a rectangular area.
P = 2(l + w)
Calculate Rectangle Diagonal
Use this form to compute the diagonal length — bracing a frame, fitting a TV into a wall niche, or any Pythagorean-theorem application.
d = √(l² + w²)
Calculate Rectangle Length from Area and Width
Use this rearrangement when the area and width are known and you need the corresponding length — sizing a room to a target area, for example.
l = A / w
Calculate Rectangle Width from Area and Length
Use this rearrangement when the area and length are known and you need the width.
w = A / l
How It Works
This rectangle calculator solves the basic rectangle formulas: area A = l·w, perimeter P = 2(l+w), and diagonal d = √(l²+w²). Pick the unknown with the solve-for toggle, enter the remaining two values in any supported length or area unit, and the calculator converts to SI internally before computing. All five quantities (l, w, A, P, d) are always shown together so you get the full picture from a single page.
Example Problem
A garden bed measures 5 m long by 3 m wide. What is its area, perimeter, and diagonal?
- Knowns: l = 5 m, w = 3 m
- Area: A = l × w = 5 × 3 = 15 m²
- Perimeter: P = 2(l + w) = 2(5 + 3) = 16 m
- Diagonal: d = √(l² + w²) = √(25 + 9) = √34 ≈ 5.831 m
- Sanity check (inverse): from A = 15 and w = 3, l = A/w = 5 m, recovering the original length.
The diagonal here is irrational — Pythagorean triples (3-4-5, 5-12-13, etc.) produce integer diagonals; arbitrary side ratios usually don't.
When to Use Each Variable
- Solve for Area — when l and w are known and you need the enclosed area — flooring, paint, fabric.
- Solve for Perimeter — when you need the boundary length — fencing, framing, trim.
- Solve for Diagonal — when you need to know the corner-to-corner distance — TV size, brace length, package fit.
- Solve for Length — when the area and width are known and you need the missing side.
- Solve for Width — when the area and length are known and you need the missing side.
Key Concepts
A rectangle is a four-sided polygon with four right angles and opposite sides of equal length. Two numbers — length l and width w — fully determine its geometry. From those, area, perimeter, and diagonal all follow. A rectangle with l = w is a square (a special case where the diagonal is exactly l√2). The diagonal is the hypotenuse of a right triangle with legs l and w, so the Pythagorean theorem gives d = √(l² + w²).
Applications
- Construction and remodeling: size flooring, drywall, paint coverage, or roofing for rectangular rooms
- Land surveying: compute parcel area and perimeter from measured side lengths
- Manufacturing: cut sheet material to size, plan rectangular part nesting, estimate scrap
- Geometry instruction: foundational shape for area, perimeter, and Pythagorean-theorem problems
Common Mistakes
- Confusing area (l × w, in square units) with perimeter (2(l+w), in linear units)
- Mixing length units across sides (e.g., l in feet, w in meters) without converting
- Using the diagonal formula on non-rectangular quadrilaterals (parallelograms have a different diagonal relationship)
- Reporting the diagonal in square units — diagonal is a length, not an area
Frequently Asked Questions
How do you calculate the area of a rectangle?
Multiply length by width: A = l × w. For example a 5 m × 3 m rectangle has area 5 × 3 = 15 m².
What is the formula for the perimeter of a rectangle?
P = 2(l + w). Add the length and width and multiply by two. For a 5 × 3 rectangle, P = 2 × 8 = 16 units.
How do you find the diagonal of a rectangle?
Use the Pythagorean theorem: d = √(l² + w²). For a 5 × 3 rectangle, d = √(25 + 9) = √34 ≈ 5.831.
How do you find the length of a rectangle given the area and width?
Divide: l = A / w. For A = 15 m² and w = 3 m, l = 5 m.
What's the difference between a rectangle and a square?
A square is a rectangle with all four sides equal. Every square is a rectangle, but only rectangles with l = w are squares. For a square with side s, A = s², P = 4s, and d = s√2.
How do you find the width of a rectangle given the area and length?
Divide: w = A / l. For A = 15 m² and l = 5 m, w = 3 m.
Can a rectangle have an irrational diagonal?
Usually yes. The diagonal is rational only when l and w form a Pythagorean pair (3-4-5, 5-12-13, 8-15-17, etc.). For arbitrary side ratios the diagonal is irrational — for example a 1×1 square has diagonal √2.
How do you compute the area of a rectangle in different units?
The calculator handles unit conversion automatically — enter inputs in any supported length unit (m, cm, in, ft, yd), and select the desired output unit for area (m², ft², in², acres, etc.). The ResultTable shows the area in all common units.
Reference: Weisstein, Eric W. "Rectangle." MathWorld — A Wolfram Web Resource. https://mathworld.wolfram.com/Rectangle.html
Worked Examples
Flooring
How much hardwood is needed for a 5 × 3 m room?
A rectangular living room measures 5 m by 3 m. Find its area to size the hardwood order.
- Knowns: l = 5 m, w = 3 m
- Formula: A = l × w
- A = 5 × 3 = 15 m²
- Convert to ft²: 15 × 10.764 ≈ 161.46 ft²
Area = 15 m² ≈ 161.5 ft²
Add 5–10% waste factor for cuts and pattern matching when ordering wood.
Fencing
How much fence material does a 50 × 30 m yard need?
A backyard 50 m long by 30 m wide needs perimeter fencing. Compute the total run.
- Knowns: l = 50 m, w = 30 m
- Formula: P = 2(l + w)
- P = 2 · 80 = 160 m
Perimeter = 160 m (≈ 525 ft)
Add a gate's worth of post-and-rail at any access points.
TV Diagonal
How big is a 16:9 TV with a 121 cm screen width?
A flat-panel TV has a 16:9 aspect ratio and a screen width of 121 cm. Find the diagonal (the 'inch size' is the diagonal).
- Knowns: l = 121 cm, w = 121 × 9/16 = 68.06 cm
- Formula: d = √(l² + w²)
- d = √(14641 + 4632) = √19273 ≈ 138.8 cm
- Convert to inches: 138.8 / 2.54 ≈ 54.7 in
Diagonal ≈ 138.8 cm ≈ 55 inch TV
TV size is always quoted as the diagonal of the screen, not the width or height alone.
Rectangle Formulas
All rectangle properties follow from two dimensions: the length l and the width w. From those, area, perimeter, and diagonal derive:
Where:
- A — area (m², ft², in², etc.)
- P — perimeter (m, ft, in)
- d — diagonal length
- l — length of the longer side (convention; the formula is symmetric)
- w — width of the shorter side
Related Calculators
- Square Calculator — find area, perimeter, and diagonal for a square
- Circle Calculator — compute area and circumference for a circle
- Triangle Calculator — find sides, angles, and area for any triangle
- Geometric Formulas Calculator — explore area and perimeter formulas for many shapes
- Area Converter — switch between m², ft², acres, and other area units
Related Sites
- Temperature Tool — Temperature unit converter
- Z-Score Calculator — Z-score, percentile, and probability calculator
- OptionsMath — Options trading profit and loss calculators
- Medical Equations — Hemodynamic, pulmonary, and dosing calculators
- Dollars Per Hour — Weekly paycheck calculator with overtime
- Percent Off Calculator — Discount and sale price calculator