Who legally owes the tax is a state-by-state question, and it is not always the buyer. Some states impose the tax on the seller for the privilege of making retail sales and let it be passed on; others impose it on the consumer and make the seller the collection agent. The distinction rarely matters at the register and matters a great deal in an audit, because it decides who the state pursues for tax that was never remitted. Federal law sidesteps the question for deduction purposes: Internal Revenue Code section 164(b)(5)(G) provides that where the tax is separately stated and paid by a consumer to the seller, it is treated as "a tax imposed on, and paid by, such consumer."
The base varies more than the rate, and the exemptions are not the ones people assume. Most states that tax sales exempt or reduce the rate on groceries, and exemption for prescription drugs is close to universal. Clothing is the outlier: it is fully exempt in only a handful of states and capped at a per-item price in a few more, so grouping it with groceries and prescriptions inverts the picture. Many states also exempt most services while taxing goods, which is why two households with identical spending can face very different effective rates depending on how much of their budget goes to services.
Where a sale happens is a rule, not a fact. States apply sourcing rules to decide whether the rate is the buyer's or the seller's. Destination sourcing, which uses the delivery address, is the predominant approach but is not universal: about a dozen states source intrastate sales to the seller's location instead. The distinction is invisible to most shoppers and decisive for anyone selling across a state.
Online sales changed in 2018. In South Dakota v. Wayfair, Inc., decided June 21, 2018, the Supreme Court overruled the physical-presence rule that had let a seller with no premises in a state decline to collect that state's sales tax. States responded with economic nexus laws keyed to a seller's sales or transaction volume, which is why an out-of-state online retailer now charges sales tax on most orders. Where a seller still does not collect, the state's use tax is what fills the gap. Describing South Dakota's regime, which it noted many states mirror, the Court wrote that "if for some reason the sales tax is not remitted by the seller, then in-state consumers are separately responsible for paying a use tax at the same rate."
Sales tax takes the same slice of a purchase from every buyer, and that is the source of the fairness argument around it. A household that spends most of what it earns pays sales tax on most of what it earns. A household that saves or invests a large share pays it on a smaller share. Grocery exemptions and sales tax holidays are the usual legislative responses; neither changes the underlying arithmetic much.