One gallon of paint covers about 350 sq ft per coat, so a 12×12 room with 8-ft walls, one door and two windows needs about 2 gallons for two coats. For drywall, divide wall and ceiling area by 32 sq ft per 4×8 sheet. For flooring and tile, divide floor area by box coverage. Add 10% waste.
About 2 gallons for two coats on 8-ft walls: 384 sq ft of wall minus one door (20 sq ft) and two windows (15 sq ft each) is 334 sq ft, and 334 × 2 ÷ 350 = 1.9 gallons.
17 sheets of 4×8 for the walls and ceiling with one door, one window and 10% waste: (384 + 144 − 35) × 1.10 ÷ 32 = 16.9.
Add about 10% for straight layouts and 15% for diagonal or herringbone patterns, then round up to whole boxes.