COC

Rectangle Calculator – Area, Perimeter, Diagonal & Missing Dimensions | Free Tool
Free Geometry Tool

Rectangle Calculator

Instantly calculate area, perimeter, diagonal, aspect ratio and missing dimensions from any two known rectangle measurements. Six calculation modes cover every combination of length, width, area and perimeter — in Metric or Imperial units.

✓ 6 calculation modes   ✓ Metric & Imperial   ✓ Missing dimension solver

Rectangle Calculator

What Is a Rectangle?

From the four right angles that define it to the construction sites and design studios where it appears daily.

The defining properties of a rectangle

A rectangle is a quadrilateral — a four-sided polygon — in which every interior angle is exactly 90 degrees. This single constraint, four right angles, is what distinguishes a rectangle from other four-sided shapes like parallelograms (which may have slanted angles), trapezoids (only one pair of parallel sides) and rhombuses (equal sides but not necessarily right angles). Because all angles are right angles, opposite sides of a rectangle must be equal in length and parallel to each other — these properties follow mathematically from the angle constraint rather than being separate requirements. A rectangle is fully described by just two measurements: its length (the longer dimension, by convention) and its width (the shorter dimension). From these two values, every other geometric property of the rectangle — its area, perimeter, diagonal and aspect ratio — can be calculated directly.

Area: the two-dimensional space inside

The area of a rectangle is the simplest of the four main calculations: multiply length by width. This works because a rectangle can be thought of as rows and columns of unit squares arranged in a grid — length columns wide and width rows tall — and the total number of unit squares is length × width. Area is always expressed in square units (m², ft², cm²) because it describes a two-dimensional surface rather than a one-dimensional distance. In practical terms, area is the number you need whenever you want to know how much material will cover the surface: how many floor tiles, how much paint, how much carpet, how much turf, how many roof slates, or how much fabric for a banner or curtain. The rectangle's area formula is foundational because more complex shapes are frequently estimated or calculated by dividing them into rectangular sections.

Perimeter: the total boundary length

The perimeter of a rectangle is the total distance around its outer edge — the sum of all four side lengths. Because opposite sides are equal, the perimeter simplifies to 2 × (length + width), which adds one length and one width to get half the perimeter, then doubles to account for both pairs of sides. Perimeter is expressed in linear units (m, ft, cm) because it is a one-dimensional measurement even though it describes a boundary. Perimeter calculations determine the amount of linear material needed to enclose or border a rectangular space: fencing around a garden, skirting board around a room, picture frame moulding around a canvas, guttering along a roof edge, kerb around a car park, or security barrier around a site. Many real-world tasks require both perimeter and area simultaneously — a painter needs area to estimate how much paint to mix, but also needs perimeter to plan cutting-in around the edges.

Diagonal: the longest straight line inside a rectangle

The diagonal of a rectangle is the straight line connecting opposite corners, passing through the interior of the shape. Its length is found using the Pythagorean theorem applied to the right triangle formed by the length, width and diagonal: the diagonal equals the square root of (length squared plus width squared). The two diagonals of a rectangle are always equal in length and bisect each other — they cross at the exact centre of the rectangle, dividing each other in half. Diagonal calculations are important whenever something must physically pass through or fit inside a rectangular space: the longest item of furniture that can be carried through a room, the maximum length of structural beam that can be laid flat inside a rectangular floor plan, the cutting path of a diagonal seam or zip in a rectangular piece of fabric, or the span of a diagonal brace in a rectangular frame structure.

Aspect ratio: the shape of the rectangle

The aspect ratio expresses how long a rectangle is relative to its width, calculated by dividing length by width. A rectangle with an aspect ratio of 1:1 is a square. Common aspect ratios include 4:3 (traditional television and photography), 16:9 (widescreen HD displays), 1:1.414 (ISO paper sizes, where each size is half the previous in area with the same aspect ratio), and 3:2 (35mm film photography). Aspect ratio matters in graphic design, photography, screen manufacturing, paper cutting, room planning and window design, where the proportions of a rectangle affect both aesthetics and functional fit.

The relationship between rectangles and squares

A square is a special case of a rectangle in which the length and width are equal. All squares are rectangles (they satisfy the four-right-angle definition), but not all rectangles are squares (most rectangles have unequal length and width). This relationship matters in geometry proofs, in manufacturing (where square cuts are simpler and symmetric), and in problem-solving, where a "find the rectangle with maximum area for a given perimeter" problem has its answer at the square. This calculator handles squares automatically when equal values are entered for length and width, and will report an aspect ratio of 1.0 to confirm the shape is a square.

Solving for missing dimensions: working backwards from known values

In many practical situations, you know some properties of a rectangle but need to find others. A contractor who knows that a room must have an area of 30 m² and a length of 6 m can find the width by dividing area by length. A fencing contractor who knows the perimeter and one side of a plot can find the other side by subtracting one length from half the perimeter. This calculator supports all six combinations of two known values from the four main rectangle properties (length, width, area, perimeter), automatically solving for the two unknown values and then computing the diagonal and aspect ratio as well.

Coordinate geometry: rectangles in mathematical space

In coordinate geometry, a rectangle aligned with the coordinate axes is defined by the x-coordinates of its left and right edges and the y-coordinates of its top and bottom edges. Its length and width are simply the differences between corresponding coordinate pairs, its area follows directly, and its diagonal's slope and length can both be calculated from coordinate arithmetic. This perspective is important in computer graphics (screen pixel rectangles, bounding boxes of images and interface elements), geographic information systems (bounding boxes of map regions), and mathematical analysis (rectangles as regions of integration in calculus).

Rectangle calculations across industries

Rectangles are the dominant shape in the built environment. Rooms, buildings, plots of land, timber sections, glass panes, concrete slabs, floor tiles, ceiling panels, doors, windows, shipping containers, paper sheets and screen displays are all rectangles in standard form or close approximations of one. This universality means that rectangle area and perimeter calculations are among the most frequently performed measurements in construction, architecture, interior design, manufacturing and logistics. The rectangle calculator replaces ruler-and-formula manual work with instant results, eliminating the arithmetic errors that regularly produce costly over-ordering or under-ordering of materials in real projects.

How This Calculator Works

Six modes, six units, any two known values — instant complete geometry output.

1

Choose Your Known Measurements

Select the mode that matches the two values you already know — length and width, area and one side, or perimeter and one side. The correct input fields appear automatically.

2

Automatic Geometry Calculations

Area, perimeter, diagonal, missing dimensions and aspect ratio are all calculated simultaneously using exact rectangle formulas as soon as you click Calculate.

3

Real-Time Visualization

A live SVG rectangle diagram scales to match your dimensions, with labelled length, width, diagonal, area shading and dimension arrows that update with each calculation.

4

Professional Measurement Results

Results display instantly in the selected unit with configurable decimal precision, alongside the rectangle orientation (landscape, portrait or square) and a full unit label on every value.

Rectangle Formulas

Every geometric equation this calculator uses, with a practical example for each.

Area = L × W  |  Perimeter = 2(L + W)  |  Diagonal = √(L² + W²)

Area

A = L × W

L = 12 m, W = 8 m → Area = 96 m². This is how much floor, wall or land surface the rectangle covers.

Perimeter

P = 2 × (L + W)

L = 12 m, W = 8 m → P = 2 × 20 = 40 m. This is the total fencing, skirting or edging required.

Diagonal

d = √(L² + W²)

L = 12 m, W = 8 m → d = √(144+64) = √208 ≈ 14.42 m. Used for squaring corners and structural bracing.

Aspect Ratio

AR = L ÷ W

L = 12 m, W = 8 m → AR = 1.5:1. Describes the shape's proportions independent of its size.

Missing Width

W = A ÷ L W = (P ÷ 2) − L

Area 500 m², Length 25 m → Width = 20 m. Or Perimeter 80 m, Length 25 m → Width = 15 m.

From Area & Perimeter

L,W = solve quadratic x² − (P/2)x + A = 0

Area 75 m², Perimeter 40 m → solve x² − 20x + 75 = 0 → L = 15 m, W = 5 m.

L (Length) — The longer of the two perpendicular dimensions; units in m, cm, mm, ft, in or yd.
W (Width) — The shorter perpendicular dimension; the same unit as length.
A (Area) — The surface covered by the rectangle; expressed in square units (m², ft²).
P (Perimeter) — Total boundary length; expressed in the same linear unit as L and W.
d (Diagonal) — Pythagorean distance between opposite corners; always longer than either side.
AR (Aspect Ratio) — Dimensionless ratio L÷W; equals 1.0 for a square, greater than 1 for any rectangle.

Worked Examples

Five complete rectangle calculations with every step shown.

Example 1 — Basic Geometry: Length 12 cm, Width 8 cm

Area = 12 × 8 = 96 cm² Perimeter = 2 × (12 + 8) = 40 cm Diagonal = √(12² + 8²) = √(144+64) = √208 ≈ 14.42 cm Aspect Ratio = 12 ÷ 8 = 1.50 : 1 (Landscape) Orientation = Landscape

These are the textbook values for a standard geometry problem. The diagonal length (14.42 cm) tells you the longest straight line that fits inside this rectangle — useful for determining if a diagonal cut or brace is feasible in a physical application.

Example 2 — Flooring Installation: 15 ft × 12 ft Room

Area = 15 × 12 = 180 ft² Perimeter = 2 × (15 + 12) = 54 ft Diagonal = √(15² + 12²) = √(225+144) = √369 ≈ 19.21 ft Flooring (10% waste): 180 × 1.10 = 198 ft² to order Skirting board: 54 ft (less door openings)

A floor contractor uses area to order flooring material (adding 10% for cuts and waste), perimeter to determine the length of skirting board needed, and the diagonal to plan diagonally-laid floor tile layouts that require longer cuts at the edges.

Example 3 — Land Survey: Area 500 m², Length 25 m

Width = Area ÷ Length = 500 ÷ 25 = 20 m Perimeter = 2 × (25 + 20) = 90 m Diagonal = √(25² + 20²) = √(625+400) = √1025 ≈ 32.02 m Aspect Ratio = 25 ÷ 20 = 1.25 : 1

A surveyor working from an existing area measurement and one known boundary length can find the missing dimension instantly. The 90-metre perimeter directly determines the length of boundary wall or fencing required for the plot.

Example 4 — Garden Fence: Perimeter 80 m, Length 25 m

Width = (Perimeter ÷ 2) − Length = 40 − 25 = 15 m Area = 25 × 15 = 375 m² Diagonal = √(25² + 15²) = √(625+225) = √850 ≈ 29.15 m Aspect Ratio = 25 ÷ 15 ≈ 1.67 : 1

A homeowner who has ordered exactly 80 metres of fencing and knows one side of their garden is 25 metres can use this calculation to confirm the width of the enclosed area before buying any additional materials.

Example 5 — Interior Design: Area 18 m², Perimeter 18 m

Solve: x² − 9x + 18 = 0 Discriminant = 81 − 72 = 9 x = (9 ± 3) ÷ 2 → Length = 6 m, Width = 3 m Area check: 6 × 3 = 18 m² ✓ Perim check: 2(6+3) = 18 m ✓ Diagonal = √(36+9) = √45 ≈ 6.71 m Wall area (4 walls × 2.5 m ceiling): 2×(6+3)×2.5 = 45 m²

An interior designer who knows a room's floor area and total perimeter can uniquely determine its length and width using the quadratic formula, then calculate wall area for paint estimation without needing to measure the room again.

Quick Reference Tables

Rectangle formulas, missing dimension solutions and real-world applications.

PropertyFormula
AreaLength × Width
Perimeter2 × (Length + Width)
Diagonal√(Length² + Width²)
Aspect RatioLength ÷ Width
Known ValuesMissing Dimension Formula
Area & Length → WidthWidth = Area ÷ Length
Area & Width → LengthLength = Area ÷ Width
Perimeter & Length → WidthWidth = (Perimeter ÷ 2) − Length
Perimeter & Width → LengthLength = (Perimeter ÷ 2) − Width
Area & Perimeter → L, WSolve x² − (P/2)x + A = 0
IndustryUse Case
ConstructionRoom & Building Layout
ArchitectureFloor Plans
Interior DesignFurniture Planning
SurveyingLand Measurement
ManufacturingMaterial Cutting
LandscapingGarden Design

Benefits of Using This Calculator

Why builders, designers and students trust this tool for every rectangle calculation.

Instant Rectangle Calculations

Area, perimeter, diagonal and aspect ratio calculated simultaneously the moment you click Calculate.

🔄

Multiple Calculation Modes

Six modes covering every combination of two known rectangle properties — no more manual rearranging of formulas.

🔍

Missing Dimension Solver

Find length or width from area, perimeter or their combination using exact algebraic solutions including the quadratic formula.

🌐

Metric & Imperial Support

Six unit options from millimetres to yards — area and perimeter results display in the matching square and linear units automatically.

📐

Interactive SVG Visualization

A live scaled rectangle diagram with labelled dimensions, diagonal line and area shading updates with every calculation.

📱

Mobile-Friendly Design

Fully responsive layout works perfectly on phones, tablets and desktops for on-site use or office calculations.

Real-World Applications

Where rectangle calculations drive real decisions in every industry.

Floor Plan Land Plot Screen / Display

Construction

Every room, slab, wall panel and window opening on a construction site is defined by rectangle dimensions that determine material quantities and labour time.

Architecture

Floor plans are composed of rectangular spaces whose areas sum to the total building area used for planning regulations, heating calculations and cost estimates.

Interior Design

Furniture placement, rug sizing, wall art arrangement and room layout planning all start from the room's rectangular dimensions.

Flooring Estimation

Carpet, laminate, tile and hardwood flooring are ordered in square units calculated from room length times width, plus a waste allowance.

Painting Projects

Wall area (length × height for each wall surface) determines how many litres of paint are needed, while perimeter determines primer tape and edging time.

Landscaping

Lawn turf, bark mulch, topsoil and paving material quantities are all calculated from the rectangular area of the space to be covered.

Surveying

Rectangular land plots are defined by boundary lengths whose product gives the enclosed area for cadastral registration and valuation.

Manufacturing

Sheet metal, plywood, glass, fabric and paper are cut to rectangular dimensions where area determines material cost and perimeter determines cutting time.

Furniture Design

Tabletops, shelves, drawer fronts and cabinet panels are rectangular components designed to specific length and width targets.

Blueprint Drafting

Engineering and architectural drawings represent rectangular spaces at scale, with area and perimeter annotated for specification purposes.

Civil Engineering

Roads, bridges, retaining walls and drainage channels have rectangular cross-sections whose dimensions determine structural and hydraulic capacity.

Mathematics Education

Rectangle area and perimeter are the first mensuration topics in school geometry, providing the foundation for all later shape and volume calculations.

Common Mistakes to Avoid

The errors that consistently produce wrong rectangle calculations in real projects.

Confusing length and width

While mathematically interchangeable in the area formula (A = L × W = W × L), mixing up which dimension is which causes errors when calculating missing dimensions from area or perimeter separately.

Mixing measurement units

Entering length in metres and width in centimetres gives an area in metre-centimetres, which is meaningless. All dimensions must use the same unit before any calculation.

Forgetting to multiply by two for perimeter

A rectangle has four sides — two lengths and two widths. Adding only one length and one width gives half the perimeter, resulting in a significant underestimate of fencing or edging requirements.

Using the wrong diagonal formula

The diagonal of a rectangle is √(L² + W²), not L + W or (L + W)/2. Adding the sides gives the perimeter of one corner, not the diagonal length.

Incorrect aspect ratio calculations

Aspect ratio is always the larger dimension divided by the smaller (or length by width as defined for the specific context). Inverting the ratio gives a value less than 1, which may be misinterpreted as the wrong orientation.

Using inconsistent units for area

Area must always carry a squared unit. An area entered as 500 m but treated as 500 m² is off by a factor of the unit length — a mistake that is easy to make when transferring values between calculations.

Rounding too early in calculations

Rounding length or width to one decimal place before computing area can introduce errors that compound in later calculations. Keep full precision until the final result.

Frequently Asked Questions

Everything students, contractors and designers ask about rectangle calculations.

What is the formula for the area of a rectangle?

Area = Length × Width. Both dimensions must be in the same unit, and the result is expressed in the corresponding square unit (m², ft², cm²).

How do I calculate the perimeter of a rectangle?

Perimeter = 2 × (Length + Width). This adds both pairs of opposite sides together to give the total boundary length.

How do I calculate the diagonal?

Diagonal = √(Length² + Width²), using the Pythagorean theorem applied to the right triangle formed by the two sides and the diagonal.

What is an aspect ratio?

Aspect ratio is Length ÷ Width — a dimensionless number expressing how long a rectangle is relative to its width. A 16:9 widescreen display has an aspect ratio of approximately 1.78.

Can I calculate missing dimensions?

Yes. This calculator supports six modes covering all combinations of two known values from length, width, area and perimeter, automatically solving for the two unknown dimensions.

What is the difference between a rectangle and a square?

A square is a rectangle with equal length and width (aspect ratio 1.0). All squares satisfy the rectangle definition (four right angles, opposite sides equal), but most rectangles have unequal sides.

Can I use feet and meters?

Yes, but not in the same calculation. Select a single unit (feet or metres) from the dropdown and enter all dimensions in that unit. The calculator applies the correct square and linear unit labels to the results automatically.

Is this calculator accurate?

Yes. It uses exact arithmetic and JavaScript's Math.sqrt() function at full floating-point precision. Results are as accurate as the input measurements, with configurable decimal precision from 0 to 4 places.

Can builders use this calculator?

Yes. All six modes produce the values builders need most: area for material ordering, perimeter for edging and boundary work, diagonal for squaring corners, and missing dimension solving for layout from one known side.

Can architects use this calculator?

Yes. Architects can use it to verify floor plan dimensions, calculate room areas for compliance checking, and quickly find missing dimensions from area or perimeter specifications.

How do I calculate flooring area?

Select Length & Width mode, enter the room's length and width, and read the area result. Add 10–15% for cutting waste when ordering flooring material.

How do I calculate fencing length?

The perimeter result gives the total fencing length. If you know the area and one side, use Area & Length or Area & Width mode to find the missing dimension before the perimeter is calculated.

Does this calculator support Metric and Imperial units?

Yes. Millimetres, centimetres, metres, inches, feet and yards are all supported, with area results displayed in the correct square unit for each.

Is this suitable for students?

Yes. All six calculation modes with labelled formulas, a live diagram and configurable precision make this a practical geometry homework and exam revision tool.

Is this calculator free?

Yes, this Rectangle Calculator is completely free to use with no registration, subscription or payment required.

Ready to Calculate Rectangle Dimensions?

Instantly calculate rectangle area, perimeter, diagonal, aspect ratio and missing dimensions for construction, architecture, design, manufacturing and everyday geometry projects.