Tax calculation is the process of working out the correct indirect tax, whether sales tax, value-added tax (VAT) or goods and services tax (GST), to charge on each transaction. The result depends on where the parties are, what is sold and who buys it. In the United States, states and often counties, cities and special districts set sales tax, so rates can differ within one ZIP code. A seller collects only where it has nexus, a sufficient connection that since the 2018 Supreme Court decision in South Dakota v. Wayfair can arise from sales volume alone. VAT and GST systems generally tax digital services where the customer is located, and business buyers may fall under a reverse charge.
Product taxability adds another layer, since software, food and clothing are treated differently from place to place. E-commerce and subscription billing systems therefore usually call a tax engine that returns the tax for every line of an invoice.