# How to Find the Sides of a Rectangle from the Perimeter and Area

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

When you know the width and length of a rectangle, you can easily calculate its perimeter and area. However, a more challenging math problem is to do the opposite: compute the side lengths of a rectangle when you know the perimeter and area. As it turns out, you can use quadratic equations to solve this type of geometric problem.

If you're not too keen on solving equations, you can also use the calculator on the left. Just select the first radio button and enter the area and perimeter.

### Deriving a Quadratic Equation

Start with two basic equations, P = 2W + 2L and A = WL. (P = perimeter, A = area, W = width, and L = length.) At first glance, it may seem like there are too many variables to work with and no obvious quadratic equation.

However, since P and A are known values, you actually have two equations in two variables. This is enough to ensure that you arrive at a unique solution.

The trick is to solve the perimeter equation for L in terms of W and P, then substitute that expression in the area equation. Doing so gives you

P = 2W + 2L
P - 2W = 2L
P/2 - W = L

and then

A = WL
A = W(P/2 - W)
A = (P/2)W - W2
W2 - (P/2)W + A = 0

Perfect! You now have a quadratic equation in the variable W. The quantities P/2 and A are just numbers.

### Example

A landscaper is building a rectangular pool and wants the pool to have an area of 96 square meters and a perimeter of 40 meters. What should the width and length of the pool be? Using the method above, we have

40 = 2W + 2L    and    96 = WL, or
L = 20 - W    and    96 = W(20 - W), thus
W2 - 20W + 96 = 0

At this point, you can use the quadratic equation to solve for W:

W = [20 + sqrt(202 - 4(96))]/2 = 12 and
W = [20 - sqrt(202 - 4(96))]/2 = 8

You will always get two values for W, the larger value is the length and the smaller value is the width. If your rectangle happens to be a square, the two values of W will be equal, since the all of the sides of a square are equal. The solution to this sample problem means that the landscaper should build a pool that is 8 meters wide by 12 meters long.

The short-cut formulas for W and L are

L = 0.25[P + sqrt(P2 - 16A)],      W = 0.25[P - sqrt(P2 - 16A)]

Use these quicker formulas when you don't have time to work out the math by hand.