Math
Rectangle Calculator
Calculate the area, perimeter, diagonal, and aspect ratio of a rectangle from its length and width, or solve sides from area and perimeter.
Rectangle dimensions
Area
12
- Length
- 4
- Width
- 3
- Perimeter
- 14
- Diagonal
- 5
- Aspect ratio
- 1.3333
Frequently Asked Questions about the Rectangle Calculator
How do you calculate the area of a rectangle?
Multiply length by width: A = L x W. A room that is 12 ft by 10 ft has an area of 120 sq ft. Both sides must be in the same unit, since mixing feet and inches gives a wrong result.
What is the formula for the diagonal of a rectangle?
Use the Pythagorean theorem: d = sqrt(L^2 + W^2). A 4 ft by 3 ft rectangle has a diagonal of sqrt(16 + 9) = 5 ft. For a square with side s, the diagonal simplifies to s x sqrt(2), roughly 1.414 x s.
Can I solve a rectangle from area and perimeter alone?
Yes, when a real solution exists. The calculator treats L + W = P / 2 and L x W = A, so length and width are the roots of x^2 - (P/2)x + A = 0. The discriminant is (P/2)^2 - 4A. When it is negative, no rectangle can have that combination of area and perimeter, and the calculator returns no result.
Why does area = 100 with perimeter = 20 return no result?
A perimeter of 20 means L + W = 10. The largest possible area at that perimeter is the square case, 5 x 5 = 25 sq units. An area of 100 is mathematically impossible here, so the discriminant goes negative and the calculator correctly reports no solution.
What is the aspect ratio?
Aspect ratio is length divided by width (L / W). A square has an aspect ratio of exactly 1. A 1920 x 1080 HD display has an aspect ratio of about 1.778, the familiar 16:9. Use it to compare the shape of rectangles independently of their size.