Sales Tax / Markup / Margin Calculator

Calculate sales tax, markup vs margin and retail pricing in one place.

Open tool

Overview

A combined sales tax, markup, and margin calculator solves the end-to-end retail pricing problem in one workflow. Retailers need to start from a wholesale cost, layer on a target margin to derive the shelf price, and then apply sales tax to produce the price the customer actually pays. Each layer has its own pitfalls — confusing markup with margin, applying tax to the wrong base, or rounding the wrong direction — and getting any of them wrong eats into the bottom line.

This tool covers the three most common operations a small retailer or e-commerce operator runs daily: compute the sales tax owed on a transaction, convert between markup and margin, and back-solve a wholesale cost from a target shelf price and target margin. Tax rates vary by jurisdiction (state, county, city, and often special districts) and many products have category-specific exemptions, so the user enters the effective combined rate rather than relying on a lookup.

How it works

Sales tax: tax = subtotal × tax_rate; total = subtotal × (1 + tax_rate). Reverse tax (back out tax from a tax-inclusive price): subtotal = total / (1 + tax_rate). Margin: margin = (price − cost) / price. Markup: markup = (price − cost) / cost. Converting between them: margin = markup / (1 + markup) and markup = margin / (1 − margin). To set price from cost and target margin: price = cost / (1 − margin). To find required cost for a desired shelf price and margin: cost = price × (1 − margin).

Examples

  • $99 subtotal at an 8.25% tax rate: tax $8.17, total $107.17.
  • $107.17 tax-inclusive at 8.25%: subtotal $99.00, tax $8.17.
  • Cost $40, target margin 60%: shelf price 40 / (1 − 0.60) = $100; markup is 150%.
  • Cost $25, marked up 50%: price $37.50, margin 33.3%.
  • Selling at $200 with a target 40% margin requires a wholesale cost of 200 × 0.60 = $120.

FAQ

Should I price by margin or by markup?
Set targets in margin — financial statements report margin. Many wholesalers quote markup, so know the conversion.

Is sales tax on the price before or after my margin?
Sales tax is on the final selling price (subtotal). It is separate from your margin calculation and is collected on behalf of the tax authority.

Are shipping charges taxable?
It varies by state. Some jurisdictions tax shipping when the item is taxable; others exempt separately stated shipping.

Should sales tax be included in revenue?
No. It is a pass-through liability, not revenue. Book it separately on the balance sheet.

Why does my tax-inclusive math sometimes round oddly?
Backing tax out of a rounded total introduces fractional cents. Use bankers' rounding consistently to minimise drift.

Try Sales Tax / Markup / Margin Calculator

An unhandled error has occurred. Reload ×