Last verified · v1.0
Calculator · math
Rectangle Calculator (Area, Perimeter, Diagonal)
Compute the area, perimeter, and diagonal of any rectangle by entering its length and width. Supports all consistent linear units.
Inputs
Calculated Result
—
Explain my result
Get a plain-English breakdown of your result with practical next steps.
The formula
How the
result is
computed.
Rectangle Calculator: Area, Perimeter, and Diagonal
A rectangle is a four-sided polygon where every interior angle measures exactly 90 degrees and opposite sides are equal in length. Three fundamental measurements define a rectangle beyond its basic dimensions: its area, perimeter, and diagonal. This calculator computes all three from just two inputs — length (ℓ) and width (w).
Understanding the Variables
- Length (ℓ): The longer dimension of the rectangle, measured in any consistent linear unit (meters, feet, inches, centimeters, etc.).
- Width (w): The shorter dimension, perpendicular to the length, expressed in the same unit.
Area Formula: A = ℓ × w
The area of a rectangle equals the product of its length and width. Geometrically, this formula counts how many unit squares tile the rectangle's interior surface. According to De Montfort University's Area of a Rectangle reference, A = ℓ × w is foundational to all planar measurement and underpins practical calculations in construction, agriculture, and interior design.
Example: A room measuring 7 meters long and 4 meters wide has an area of 7 × 4 = 28 square meters.
Perimeter Formula: P = 2(ℓ + w)
The perimeter measures the total distance around the rectangle's boundary. Because opposite sides are equal, the total boundary equals two lengths plus two widths, simplified to P = 2(ℓ + w). As documented in the ORCCA Geometry Formulas curriculum at Lane Community College, this formula applies directly to fencing projects, picture framing, and any task requiring the total edge length.
Example: For the same 7 m × 4 m room, the perimeter is 2(7 + 4) = 2 × 11 = 22 meters — the exact length of baseboard trim needed to line all four walls.
Diagonal Formula: d = √(ℓ² + w²)
The diagonal of a rectangle connects two opposite corners. Because the diagonal, length, and width form a right triangle, the Pythagorean theorem applies directly: d = √(ℓ² + w²). This relationship holds for every rectangle regardless of its proportions.
Deriving the Diagonal
Drawing one diagonal across a rectangle produces two congruent right triangles. Each triangle has legs of length ℓ and w, with the diagonal as the hypotenuse. The Pythagorean theorem states ℓ² + w² = d², which rearranges to d = √(ℓ² + w²). No assumptions beyond the definition of a rectangle — four right angles — are required for this derivation.
Example: A rectangle 6 feet long and 8 feet wide has a diagonal of √(36 + 64) = √100 = 10 feet. Carpenters routinely use this result to verify square corners: if the measured diagonal matches the formula's output, all four corners sit at exactly 90 degrees.
Real-World Applications
- Construction and architecture: Floor area drives material estimates; perimeter determines framing lumber; diagonal confirms that layouts are square.
- Landscaping and agriculture: Rectangular plot area guides fertilizer quantities, while perimeter determines how much fencing a property requires.
- Interior design: Room area informs rug sizing, tile counts, and paint coverage calculations per manufacturer specifications.
- Screen and display technology: Monitor and television diagonal measurements follow the identical formula, with screen height and width as the two legs.
- Shipping and logistics: Pallet and container footprint area assists load planning, while diagonal helps confirm whether items fit within angular constraints.
How to Use This Calculator
Select the property to compute — area, perimeter, or diagonal — then enter the rectangle's length and width in any consistent linear unit. The calculator applies the relevant formula and returns the result instantly. Switching between calculation types requires no re-entry of dimensions, making it straightforward to obtain all three values for a single rectangle.
Sources and Methodology
The formulas implemented here follow standard Euclidean geometry as presented in De Montfort University's Area of a Rectangle and the ORCCA Geometry Formulas curriculum at Portland Community College. Both sources confirm A = ℓw, P = 2(ℓ + w), and the Pythagorean diagonal d = √(ℓ² + w²) as the authoritative formulas for all rectangular geometry calculations.
Reference