To work out paint, start with the walls: add up the area of all four walls (twice the length plus twice the width, times the ceiling height), then take off the parts you will not paint — about 21 square feet for each door and 15 square feet for each window. If you are painting the ceiling too, add the length times the width. That leaves the paintable area for one coat.
One gallon of paint covers about 350 square feet on a smooth wall, less on rough or unpainted surfaces — check the tin and change the coverage number if yours differs. Multiply the paintable area by the number of coats, divide by the coverage, and that is the gallons the job uses. Paint is sold in whole gallons, so round up to the gallons to buy, then multiply by your price per gallon for the cost.
For a 12 by 12 foot room with 8 foot ceilings, one door and two windows, the paintable wall area is 333 square feet, so two coats need 666 square feet of coverage — about 1.9 gallons at 350 square feet per gallon, so buy 2 gallons.
About 350 square feet per gallon for one coat on a smooth, previously painted wall is the standard figure. Rough, textured or bare surfaces drink more paint, so use 250 to 300 square feet per gallon there.
Yes: subtract about 21 square feet for each standard door and 15 square feet for each average window, because you do not paint over them. This calculator takes them off automatically.
Two coats is the usual answer for an even finish and true colour, especially over a different old colour. One coat can be enough for a refresh in the same colour over paint in good condition.
Only if you are painting it: the ceiling adds length times width square feet (144 square feet in a 12 by 12 room), which at two coats can add close to another gallon. Tick the include-ceiling box and the calculator adds it.