{
  "id": 2664887,
  "title": "Tipping on a Pre-Tax vs Post-Tax Base: A Reference Sheet for Engineers Who Build the Math",
  "url": "https://urgent.news/2026/08/22/tipping-on-a-pre-tax-vs-post-tax-base-a-reference-sheet-for-engineers",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-08-22T22:04:18.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/lizely/tipping-on-a-pre-tax-vs-post-tax-base-a-reference-sheet-for-engineers-who-build-the-math-57ad"
  },
  "original_language": "en",
  "account": "Calculating tips correctly is essential for engineering the math behind checkout flows and expense modules. The key consideration is whether to compute the tip based on the pre-tax subtotal or the post-tax total. In the United States, sales tax is typically added after the tip, meaning the tip is calculated on the pre-tax base. In regions with pre-tax models, like much of Canada, the tip is also calculated on the pre-tax amount. However, in areas with a service charge already included in the price, like some parts of the UK, adding an additional tip would double-count the service. A robust calculation function should take two inputs: the pre-tax base and the post-tax total, along with a rule selector to determine which base is appropriate. This allows for clear auditing and avoids confusion between what customers expect and what service workers receive.",
  "summary": "If you have ever wired up a \"calculator widget\" in a checkout flow, expense module, or hospitality backend, you have probably discovered that the boring question — do we tip on the pre-tax subtotal, the post-tax total, or something in between? — is not boring at all. It is a tiny rules engine wrapped in regional habits, rounding quirks, and disagreement between what a customer expects and what a…",
  "key_points": [],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}