Rectangles are everywhere: rooms, screens, paper, plots of land. Knowing any two measurements fixes the rectangle, so you can find a missing side from the area of a room or the diagonal of a TV.
How to use the Rectangle Calculator
- What do you know?
- Side a
- Side b
- Diagonal d
- Area A
- Perimeter P
Results update as you type, and everything is calculated in your browser.
How it works
Pick what you know. The missing side is found from the area, perimeter or Pythagoras, and then all the other properties follow, including the angle between the diagonal and the long side.
Inputs explained
| Field | What to enter |
|---|---|
| What do you know? | Choose one: Sides a and b, Side a and diagonal d, Side a and area A, Side a and perimeter P |
| Side a | Units: cm, m, mm, in, ft, yd … |
| Side b | Units: cm, m, mm, in, ft, yd … |
| Diagonal d | Units: cm, m, mm, in, ft, yd … |
| Area A | Units: cm², m², mm², in², ft², yd² … |
| Perimeter P | Units: cm, m, mm, in, ft, yd … |
What each result means
- Area = [Side a]×[Side b]
- Perimeter = 2×([Side a] + [Side b])
- Diagonal = sqrt([Side a]^2 + [Side b]^2)
- Angle between diagonal and side a = deg(atan([Side b]÷[Side a]))
- Circumradius (half the diagonal) = sqrt([Side a]^2 + [Side b]^2)÷2
Example values
How the main result changes when Side a changes and everything else stays at the example values above:
| Side a (cm) | Area (cm²) |
|---|---|
| 4 | 20 |
| 6 | 30 |
| 8 | 40 |
| 10 | 50 |
| 12 | 60 |
| 16 | 80 |
Formula
A = a·b, P = 2(a + b), d = √(a² + b²)
Worked example
Inputs: What do you know?: Sides a and b; Side a: 8 cm; Side b: 5 cm.
Results: Side b = 5 cm; Area = 40 cm²; Perimeter = 26 cm; Diagonal = 9.433981 cm; Angle between diagonal and side a = 32.0054 °; Circumradius (half the diagonal) = 4.716991 cm.
Key terms
- Diagonal
- A segment joining opposite corners.
Frequently asked questions
Is a square a rectangle?
Yes, a rectangle with all four sides equal.
How do I find the diagonal?
d = √(a² + b²), by the Pythagorean theorem.
What is the largest rectangle for a given perimeter?
A square.
Do rectangle diagonals bisect each other?
Yes, and they are equal in length.