Education
Rectangle Calculator
Enter length and width and the calculator returns the area, perimeter, diagonal, and simplified aspect ratio of the rectangle.
Use any consistent unit. · e.g. 8
Same unit as length. · e.g. 5
Length and width must be positive. Results use whatever unit you entered (area is unit squared, perimeter and diagonal are the same unit).
Area
40
8 × 5 = 40 sq units
Area = length × width · Perimeter = 2 × (length + width) · Diagonal = √(length² + width²).
Examples
8 by 5 rectangle
area 40 · perimeter 26 · diagonal ≈ 9.434
16 by 9 rectangle
area 144 · perimeter 50 · diagonal ≈ 18.358 · ratio 16 : 9
10 by 10 square
area 100 · perimeter 40 · diagonal ≈ 14.142
How it works
A rectangle has four right angles and two pairs of equal sides. Three single-line formulas cover everything you can measure without knowing the angles: area, perimeter, and diagonal.
Area · A = length × width
Perimeter · P = 2 × (length + width)
Diagonal · d = √(length² + width²)
Results use whatever unit you entered (area is squared).
Related geometry calculators
- Area calculator for area across rectangles, triangles, circles, and more.
- Perimeter calculator for perimeter and circumference across common shapes.
- Square footage calculator for rectangle area in square feet, yards, meters, and acres.
- Pythagorean theorem calculator for the formula behind the diagonal.
- Right triangle calculator for the half-rectangle case with angles and area.
- All education calculators.
Frequently asked questions
Multiply the length by the width. For a rectangle that is 8 units long and 5 units wide, the area is 8 × 5 = 40 square units. Area is always expressed in squared units, since you are multiplying two length measurements.
Add up all four sides, or use the shortcut formula P = 2 × (length + width). For an 8 by 5 rectangle, the perimeter is 2 × (8 + 5) = 26 units. Perimeter uses the same unit as length and width, not squared.
The diagonal is the hypotenuse of a right triangle with legs equal to the length and width. By the Pythagorean theorem, diagonal = √(length² + width²). For an 8 by 5 rectangle, the diagonal is √(64 + 25) = √89 ≈ 9.434 units.
Aspect ratio expresses how the length compares to the width. The calculator shows the simplified whole-number ratio when both dimensions are integers (for example 16 : 9, 4 : 3, 5 : 4), and the decimal value otherwise (for example 1.778 : 1). Aspect ratio is common in screens, photographs, and printed paper.
Whatever unit you used for length and width. If you entered inches, area is in square inches, perimeter and diagonal are in inches. The calculator is unit-agnostic: enter consistent values and the answers come out in the same unit family.
Yes. A square is just a rectangle with equal length and width, so enter the same value in both fields. Area becomes s², perimeter becomes 4s, and the diagonal is s × √2 ≈ 1.414s.
Related calculators
Education
Final Grade Calculator
Calculate your final course grade from your current grade and your final exam score.
Education
Weighted Grade Calculator
Combine assignments, quizzes, and exams by weight to get a precise weighted course average.
Education
Final Exam Calculator
Find out exactly what you need to score on your final exam to hit your target course grade.