Measure the back wall of your room with a tape measure from the floor to the ceiling to determine the height of the room; this is measurement H.
Measure the longest wall horizontally, from corner to corner; this is measurement L.
Take the horizontal measurement of the wall immediately perpendicular to the longest wall; this is measurement W. The three measurements tell you the size of your room (height, length and width).
Plug the measurements into the following formula: L x H. Multiply the resulting number by 2 to double it, accounting for one wall and its opposite.
Place your measurements in the next formula: W x H. Multiply the answer by 2 to double the figure and account for the two remaining walls.
Add the two answers together. The sum is the total wall square footage you need to cover with paint.
Measure the ceiling by length and height if you plan to paint the ceiling as well. Multiply the two numbers together (L x W) to get the square footage of the ceiling, and add this number to the total above.
Divide the total square footage by 320, which is the number of square feet 1 gallon of paint will cover. The resulting number is the number of gallons you need, and you must always round up to the next whole number. For example, if the answer is 2.35, you must buy at least 3 gallons of paint.