When you buy interior paint, the number of gallons or liters you need depends on the total surface area of your walls. Buy too little paint and you’ll have to make a run to the store for another gallon or two.

Buy too much and you’ve wasted money. Each manufacturer of paint has its own recommended gallons per square footage; average specs for a single coating are about 1 gallon per 350 square feet (32.5 square meters) of wall area.

If you do two coats, you need to double it. If you do three coats, you need to triple it. As long as you know the square footage of your paintable wall space, you can be sure to buy the right amount of paint.

Here’s how you can do the math quickly by hand, or get the raw numbers you need to plug into a calculator.

**Step 1:** Find the combined perimeters of all the rooms you are going to paint with the same color. The perimeter is the distance around the room. For rectangles, the perimeter is 2*L + 2*W, where L and W are the length and width. For other shapes, there aren’t always such nice neat formulas.

**Step 2:** Measure the height of the walls from the floor to the ceiling.

**Step 3:** Multiply the numbers you found in Step 1 and Step 2. For instance, if the total perimeter of the rooms is 67′ 9″ and the wall height is 7′ 2″, then you multiply 67.75 feet by 7.17 feet to get a pre-total of 485.77 square feet.

**Step 4:** Compute the combined ares of all the windows and doors. (The area of a rectangle is length times width).

**Step 5:** Take the number you found in Step 4 and subtract it from the number you obtained in Step 3. For instance, if the total area of windows and doors in the rooms is 59.42 square feet, then you calculate 485.77 – 59.42 = 426.35. This is the total square footage of wall area you need to paint.

**Step 6:** Divide the number you found in Step 5 by the number of square feet per gallon. For typical paint, you would divide by 350. For instance, 426.35/350 = 1.22. This means you need 1.22 gallons to cover all the wall space with a single coat.

**Step 7:** If you are doing two or three coats of paint, multiple the number of gallons accordingly. 1.22*2 = 2.44 and 1.22*3 = 3.66. To be on the safe side, you can round up to the nearest whole gallon so that you have extra paint for touch-ups and repairs.