Wall area from room dimensions
Perimeter times ceiling height, less the openings. Doors come off at 21 square feet (3 by 7) and windows at about 15 — adjust if yours are unusual.
Result
Trim, baseboards and doors are usually priced separately — by linear foot or per unit — rather than folded into wall area.
Questions
Do I deduct doors and windows?
On a residential repaint most estimators do, at standard sizes. On a job with very large glazing you should measure the actual openings.
Should trim be in this number?
No. Trim and baseboards are priced by linear foot and doors per unit, because they take time out of proportion to their area.
Or stop doing this in a calculator
Aerys prices the whole job from your own catalog and production rates, sends it with an accept link and an invoice already attached, and then tracks what the job actually cost against what you quoted.