How the paint estimate works
Start with the wall area. For a rectangular room, that is the perimeter times the wall height: 2 × (length + width) × height. Subtract the parts you will not paint. The calculator uses about 20 sq ft per door and 15 sq ft per window, which matches a standard 3 × 6.7 ft interior door and a 3 × 5 ft window. Multiply the remaining area by the number of coats and divide by the coverage printed on the can.
Worked example: a 12 × 14 ft bedroom with 8 ft walls has 2 × 26 × 8 = 416 sq ft of wall. One door and two windows remove 50 sq ft, leaving 366 sq ft. Two coats at 350 sq ft per gallon need 732 ÷ 350 = 2.09 gallons, so you buy 3 gallons, or 2 gallons plus a quart if the math is tight.