How many gallons of paint you need for any room - accounts for ceiling height, doors, windows, and how many coats.
Standard interior latex paint covers ~350 sq ft per gallon on the first coat (more on the second). We compute wall surface area (perimeter × height), subtract 21 sq ft per door and 15 sq ft per window, optionally add ceiling area, multiply by number of coats, then divide by 350 and round up.
Tip: Buy one gallon more than the calculator says if you're using a dark color over a light wall (3 coats may be needed). Save the leftover for touch-ups.