# How to Calculate the Area, Perimeter, or Diagonal of a Rectangle

### Solving for One Value from the Other Two Values

Rectangle Calculator
Which two rectangular measurements are known? Check radio button and enter values in the appropriate fields.
area   &perim
area   &diag
perim   &diag
length   &width

If you know the width and length of a rectangle, you can calculate its perimeter, area, and diagonal length. You can also compute the perimeter, area, or diagonal if you know the values of the other two. For example, you can compute the area if you know the perimeter and diagonal. You can apply the geometry formulas below, or you can use the convenient rectangle calculator on the left. Just input the known measurements, and the calculator will output the unknown measurement.

### Computing The Diagonal from the Perimeter and Area

It is easy to compute the diagonal of a rectangle if you know the length L and width W: D = sqrt(L2 + W2). However, you can also find the diagonal if you know just the perimeter and area of a rectangular space. If the perimeter is P and the area is A, the diagonal D is given by the equation

D = (1/2)sqrt(P2 - 8A).

### Computing The Perimeter from the Diagonal and Area

In terms of the length L and width W of a rectangle, the perimeter is P = 2L + 2W. You can also determine the perimeter if you know the diagonal length and area of a rectangle. The equation is

P = (2)sqrt(D2 + 2A).

### Computing The Area from the Perimeter and Diagonal

The equation for area in terms of length and width is A = LW. You can also measure the area of a rectangular region if you know the values of the diagonal and perimeter. The equation for area ia

A = (P2 - 4D2)/8.

Example: An interior decorator does not know the area of a room, but she knows the perimeter is 70 feet and the diagonal is 25 feet. Since P = 70 and D = 25, she can calculate

A = (702 - 4(25)2)/8
= (4900 - 2500)/8
= 300 square feet.

This decorator is an algebra whiz and decides to solve for the width and length as well. Since the perimeter equation tells her that 70 = 2L + 2W, she knows that 35 - L = W. And since the area equation tells her that 300 = WL, she also knows that

300 = (35-L)L
300 = 35L - L2
L2 - 35L + 300 = 0
L = 20 and L = 15.

So the length is 20 (taking the larger value of L) and the width is 15 (taking the smaller value of L).