Rectangle Calculator
Calculate rectangle area, perimeter and diagonal.
Free online tool by SOCE. Check inputs and results before using them for important decisions.
Rectangle Calculator – Free Online Area, Perimeter and Diagonal Guide
The SOCE Rectangle Calculator page helps students, teachers, engineers, architects, construction professionals, and mathematics learners understand how to calculate the geometric properties of a rectangle.
A rectangle is a two-dimensional quadrilateral with four right angles. Its opposite sides are parallel and equal in length. Important rectangle measurements include length, width, area, perimeter, diagonal, and aspect ratio.
This Rectangle Calculator guide explains the mathematical formulas used to calculate these properties, determine missing dimensions, and solve practical geometry problems.
Whether you are studying mathematics, measuring a rectangular room, checking a building layout, or estimating geometric quantities, understanding rectangle formulas provides a reliable foundation.
What Is a Rectangle Calculator?
A Rectangle Calculator is a mathematical tool used to determine geometric measurements of a rectangle from known dimensions.
For a rectangle with length 8 metres and width 5 metres:
- Area = 40 m².
- Perimeter = 26 m.
- Diagonal = √89 m ≈ 9.434 m.
- Aspect ratio = 8:5.
These results follow standard Euclidean geometry.
The appropriate calculation depends on which dimensions are known and which property is required.
Understanding the Properties of a Rectangle
A rectangle has several defining geometric properties.
Four Right Angles
Each interior angle measures 90°.
Equal Opposite Sides
The two opposite lengths are equal, and the two opposite widths are equal.
Parallel Opposite Sides
Both pairs of opposite sides are parallel.
Equal Diagonals
A rectangle has two diagonals of equal length.
Diagonals Bisect Each Other
The diagonals intersect at their common midpoint.
Interior Angle Sum
The sum of the four interior angles is:
4 × 90° = 360°.
Relationship with a Square
Every square is a rectangle because it has four right angles.
However, a rectangle does not need to have four equal sides.
How to Use a Rectangle Calculator
The general process for solving rectangle problems is:
- Identify the known measurements.
- Determine the required result.
- Convert all length dimensions into consistent units.
- Select the appropriate rectangle formula.
- Substitute the known values.
- Calculate the result.
- Check the units.
- Verify the result against the rectangle’s geometric properties.
For example:
Length = 12 cm
Width = 7 cm
Area:
A = 12 × 7 = 84 cm²
Perimeter:
P = 2(12 + 7) = 38 cm
Diagonal:
d = √(12² + 7²)
d = √193
d ≈ 13.89 cm
Rectangle Calculator Formulas
The following formulas are commonly used in rectangle geometry.
| Property | Formula |
|---|---|
| Area | A = lw |
| Perimeter | P = 2(l + w) |
| Diagonal | d = √(l² + w²) |
| Length from area and width | l = A/w |
| Width from area and length | w = A/l |
| Width from perimeter and length | w = P/2 − l |
| Length from perimeter and width | l = P/2 − w |
| Width from diagonal and length | w = √(d² − l²) |
| Circumradius | R = d/2 |
| Aspect ratio | l:w |
Where:
- A = area.
- P = perimeter.
- l = length.
- w = width.
- d = diagonal.
- R = radius of the circumscribed circle.
All formulas assume the dimensions represent a valid rectangle.
Rectangle Area Calculator
The area of a rectangle represents the two-dimensional region enclosed by its boundary.
Rectangle Area Formula
A = l × w
Where:
l = length.
w = width.
Worked Example
A rectangular floor measures:
Length = 15 m
Width = 9 m
Area:
A = 15 × 9
Answer: 135 m²
Area is measured in square units such as m², cm², or ft².
Finding Length from Area
If area and width are known:
l = A/w
Example:
Area = 120 m²
Width = 8 m
Length:
l = 120/8
Answer: 15 m
Finding Width from Area
If area and length are known:
w = A/l
Example:
Area = 96 cm²
Length = 12 cm
Width:
w = 96/12
Answer: 8 cm
The known side length must be positive.
Rectangle Perimeter Calculator
Perimeter measures the total boundary length of a rectangle.
Rectangle Perimeter Formula
P = 2(l + w)
This is equivalent to:
P = l + w + l + w
Worked Example
A rectangular garden measures:
Length = 20 m
Width = 12 m
Perimeter:
P = 2(20 + 12)
P = 64
Answer: 64 m
This is the ideal geometric boundary length.
Finding Width from Perimeter
Starting with:
P = 2(l + w)
Divide by 2:
P/2 = l + w
Rearrange:
w = P/2 − l
Worked Example
Perimeter = 50 cm
Length = 15 cm
Width:
w = 50/2 − 15
w = 25 − 15
Answer: 10 cm
The calculated width must be positive.
Rectangle Diagonal Calculator
A rectangle’s diagonal connects two opposite corners.
The diagonal forms a right triangle with the rectangle’s length and width.
Diagonal Formula
Using the Pythagorean theorem:
d = √(l² + w²)
Worked Example
Length = 12 cm
Width = 5 cm
Diagonal:
d = √(12² + 5²)
d = √(144 + 25)
d = √169
Answer: 13 cm
Finding Width from Diagonal
Starting with:
d² = l² + w²
Rearrange:
w² = d² − l²
Therefore:
w = √(d² − l²)
Worked Example
Diagonal = 10 m
Length = 8 m
Width:
w = √(10² − 8²)
w = √36
Answer: 6 m
For a rectangle with positive side lengths, the diagonal must be longer than either side.
Rectangle Calculator Using Area and Perimeter
If both area and perimeter are known, the rectangle’s side lengths can be determined.
Given:
A = lw
P = 2(l + w)
Define:
S = P/2
Then:
l + w = S
and:
lw = A
The side lengths are roots of:
t² − St + A = 0
Applying the quadratic formula:
l, w = [S ± √(S² − 4A)]/2
Equivalently:
l, w = [P ± √(P² − 16A)]/4
The larger result may be designated as the length.
Worked Example
Given:
Area = 48 m²
Perimeter = 28 m
First:
S = 28/2 = 14 m
Then:
l, w = [14 ± √(14² − 4 × 48)]/2
l, w = [14 ± √4]/2
l, w = (14 ± 2)/2
Therefore:
Length = 8 m
Width = 6 m
Verification:
Area = 8 × 6 = 48 m²
Perimeter = 2(8 + 6) = 28 m
Validity Condition
For a positive-area rectangle to exist:
0 < A ≤ P²/16
If A = P²/16, the rectangle is a square.
Rectangle Calculator Using Diagonal and Area
Suppose the diagonal d and area A are known.
The rectangle satisfies:
d² = l² + w²
A = lw
Since:
(l + w)² = l² + w² + 2lw
Then:
(l + w)² = d² + 2A
Therefore:
l + w = √(d² + 2A)
Define:
S = √(d² + 2A)
The sides are:
l, w = [S ± √(S² − 4A)]/2
A valid positive-area rectangle requires:
0 < A ≤ d²/2
Worked Example
Diagonal = 5 cm
Area = 12 cm²
S = √(5² + 2 × 12)
S = √49
S = 7
Then:
l, w = [7 ± √(49 − 48)]/2
l, w = (7 ± 1)/2
Length = 4 cm
Width = 3 cm
Verification:
Diagonal = √(4² + 3²) = 5 cm.
Rectangle Aspect Ratio Calculator
The aspect ratio describes the proportional relationship between a rectangle’s sides.
Aspect Ratio Formula
Aspect ratio = l:w
For a rectangle measuring 16 units by 9 units:
Aspect ratio = 16:9
For a rectangle measuring 12 units by 8 units:
Aspect ratio = 12:8
Simplifying:
Aspect ratio = 3:2
Applications
Aspect ratios are important in:
- Screen dimensions.
- Photography.
- Graphic design.
- Architectural drawings.
- Rectangular panels.
- Digital image layouts.
Aspect ratio is dimensionless because it compares two lengths measured in the same unit.
Rectangle Circumradius Calculator
A rectangle can be inscribed in a circle passing through all four vertices.
The centre of this circle is the intersection of the rectangle’s diagonals.
The circumradius equals half the diagonal.
Formula
R = d/2
Since:
d = √(l² + w²)
Then:
R = ½√(l² + w²)
Worked Example
Length = 8 cm
Width = 6 cm
Diagonal:
d = √(8² + 6²)
d = 10 cm
Circumradius:
R = 10/2
Answer: 5 cm
A general non-square rectangle does not have an incircle tangent to all four sides.
Rectangle Calculator for a Square
A square is a special rectangle with equal adjacent side lengths.
If:
l = w = s
Then:
Square Area
A = s²
Square Perimeter
P = 4s
Square Diagonal
d = s√2
Worked Example
Side length = 10 cm
Area:
A = 10² = 100 cm²
Perimeter:
P = 4 × 10 = 40 cm
Diagonal:
d = 10√2
d ≈ 14.14 cm
Rectangle Area and Perimeter Comparison
Area and perimeter measure different properties.
| Measurement | Formula | Unit |
|---|---|---|
| Area | A = lw | Square units |
| Perimeter | P = 2(l + w) | Linear units |
| Diagonal | d = √(l² + w²) | Linear units |
Example
Length = 10 m
Width = 6 m
Area:
A = 10 × 6
Area = 60 m²
Perimeter:
P = 2(10 + 6)
Perimeter = 32 m
Diagonal:
d = √(10² + 6²)
d = √136
Diagonal ≈ 11.66 m
These three results describe different geometric properties.
Rectangle Unit Conversion
Rectangle calculations may involve several measurement systems.
Common Length Units
- Millimetres (mm).
- Centimetres (cm).
- Metres (m).
- Kilometres (km).
- Inches (in).
- Feet (ft).
- Yards (yd).
Common Area Units
- mm².
- cm².
- m².
- km².
- in².
- ft².
- yd².
Conversion Factors
1 m = 100 cm
1 m = 1,000 mm
1 ft = 12 in
1 in = 2.54 cm exactly
1 ft = 0.3048 m exactly
1 m² = 10,000 cm²
1 ft² = 144 in²
Worked Example
A rectangle measures:
Length = 200 cm
Width = 150 cm
Convert to metres:
Length = 2 m
Width = 1.5 m
Area:
A = 2 × 1.5
Area = 3 m²
Perimeter:
P = 2(2 + 1.5)
Perimeter = 7 m
Always use compatible units before performing calculations.
Rectangle Calculator for Civil Engineering
Rectangle geometry is widely used in civil engineering, construction, surveying, and architectural design.
Building Floor Area
The geometric area of a rectangular floor is:
A = length × width
For a room measuring 6 m by 4 m:
A = 24 m²
This is the geometric floor area. Regulatory or contractual floor-area definitions may differ.
Concrete Slab Calculations
For an ideal rectangular slab:
Plan area:
A = lw
If slab thickness t is uniform:
V = lwt
Worked Example
Length = 6 m
Width = 5 m
Thickness = 0.15 m
Volume:
V = 6 × 5 × 0.15
Answer: 4.5 m³
This is the ideal geometric volume before considering openings and other adjustments.
Rectangular Beam Cross-Sections
For a rectangular cross-section:
A = bh
Where:
b = section width
h = section depth
Worked Example
Width = 300 mm
Depth = 500 mm
A = 300 × 500
Answer: 150,000 mm²
This is the gross geometric cross-sectional area.
Second Moment of Area
For a rectangular section of width b and depth h:
Iₓ = bh³/12
about the centroidal axis parallel to the width.
For the perpendicular centroidal axis:
Iᵧ = hb³/12
These are geometric second moments of area, with units of length to the fourth power.
Architectural Layout
Rectangle dimensions are used for rooms, doors, windows, floor plans, and rectangular panels.
Construction Material Estimation
Rectangle area and perimeter calculations can support preliminary estimates for flooring, edging, wall finishes, and other geometric quantities.
Actual material requirements depend on the construction specifications and allowances.
Common Mistakes When Calculating Rectangle Properties
- Confusing area with perimeter: Area uses square units; perimeter uses linear units.
- Using inconsistent measurement units: Convert dimensions before calculation.
- Forgetting the factor of two in perimeter: P = 2(l + w).
- Using an incorrect diagonal formula: Apply the Pythagorean theorem.
- Adding length and width to calculate area: Area requires multiplication.
- Squaring the wrong quantities: The diagonal formula squares both sides before adding.
- Using negative dimensions: Physical side lengths should be positive.
- Ignoring impossible inverse inputs: Some area and perimeter combinations do not define a valid rectangle.
- Rounding intermediate results too early: Preserve precision.
- Confusing a rectangle with a general parallelogram: Rectangle corners must be right angles.
- Assuming all rectangles are squares: Only rectangles with equal adjacent sides are squares.
- Using square-unit conversion factors for perimeter: Perimeter requires linear conversion factors.
Frequently Asked Questions About Rectangle Calculator
1. What is a Rectangle Calculator?
A Rectangle Calculator is a mathematical tool used to calculate rectangle properties such as area, perimeter, diagonal, and dimensions.
2. What is the formula for rectangle area?
A = length × width.
3. What is the formula for rectangle perimeter?
P = 2(length + width).
4. What is the formula for rectangle diagonal?
d = √(length² + width²).
5. How do you find rectangle length from area?
Divide area by width:
l = A/w.
6. How do you find rectangle width from area?
Divide area by length:
w = A/l.
7. How do you find rectangle width from perimeter?
w = P/2 − l.
8. Can rectangle dimensions be calculated from area and perimeter?
Yes, when the measurements satisfy the geometric validity conditions.
9. What is the area of a rectangle measuring 8 m by 5 m?
A = 8 × 5 = 40 m².
10. What is the perimeter of a rectangle measuring 8 m by 5 m?
P = 2(8 + 5) = 26 m.
11. What is the diagonal of a 3-4 rectangle?
d = √(3² + 4²) = 5 units.
12. What is the difference between a rectangle and a square?
Both have four right angles, but a square also has four equal sides.
13. What is the aspect ratio of a rectangle?
It is the ratio of one side length to the other, such as 16:9.
14. Why is rectangle geometry important in engineering?
Rectangle formulas are used in floor plans, structural sections, construction measurements, material estimates, and geometric modelling.
Learn Rectangle Geometry with SOCE
The SOCE Rectangle Calculator page provides mathematical formulas, worked examples, and practical explanations for understanding rectangle geometry.
Use this Rectangle Calculator resource to learn how to calculate rectangle area, perimeter, diagonal, missing dimensions, and related geometric properties.
Explore additional mathematics and engineering resources through the SOCE Geometry Calculators collection.