Do I need primer?
Primer is cheap insurance with a specific job. Five walls need it, one doesn't, and "paint and primer in one" answers a different question than people think.
The five yes cases
Bare drywall. New rock and fresh mud are two different porosities; paint alone dries patchy over the seams forever. One coat of PVA drywall primer seals both the same. It's the cheapest primer on the shelf and covers about 300 sq ft per gallon.
Patched walls. Same physics, smaller scale. Spot-prime every patch bigger than a thumbprint or the repairs flash through the finish coat as dull ghosts.
Dark to light. Painting out a red wall or a navy office? A gray-tinted primer coat hides more per dollar than an extra coat of your (more expensive) finish color.
Stains. Water rings, smoke, marker, tannin bleed from knots: ordinary primer and paint both let these crawl back through. You want a stain-blocking primer, shellac or oil based, and just on the stain if it's isolated.
Slick surfaces. Factory cabinet finishes, laminate, high-gloss trim, paneling. Regular paint grips these badly and peels at the first scrape. A bonding primer (after cleaning and a scuff sand) is the entire difference between painted cabinets and a cautionary tale.
The one no
Repainting sound, clean, previously painted walls in a similar color. The old paint is the primer. This is most repaints, which is exactly why paint-and-primer-in-one marketing works: in the case where you didn't need primer anyway, the combined can performs beautifully.
How much to buy
Primer covers about 300 sq ft per gallon and you almost always need just one coat. The room calculator has a primer toggle that figures it for the walls you've already entered, and the cabinet calculator includes bonding primer by default, because skipping it there isn't a savings, it's a do-over.