What This Calculator Does
The Margin and Sales Tax Calculator turns your product cost into a sellable, tax-inclusive price in one step. First it marks up the cost to hit your target gross margin — the percentage of the selling price that is profit. Then it applies your local sales tax rate so you can see exactly what the customer will pay at checkout.
How to Use It
Enter three values: the cost you pay for the item, the margin you want to earn (as a percentage of the selling price), and your sales tax rate. The calculator returns the pre-tax selling price, your profit, the tax amount, and the final price including tax.
The Formula Explained
Margin is profit divided by selling price, not by cost. To solve for price we use $$\text{Price} = \frac{\text{Cost}}{1 - \frac{\text{Margin}}{100}}$$ Dividing by one minus the margin guarantees the profit equals the target percentage of the final selling price. Sales tax is then added on top: $$\text{PriceWithTax} = \text{Price} \times \left(1 + \frac{\text{TaxRate}}{100}\right)$$ Tax is charged on the selling price, not on the cost or the profit.
Worked Example
Suppose an item costs $50, you want a 40% margin, and sales tax is 8%. Selling price = \(50 / (1 - 0.40) = 50 / 0.60 =\) $83.33. Profit = \(83.33 - 50 = \$33.33\) (which is 40% of $83.33). Sales tax = \(83.33 \times 0.08 = \$6.67\). Final price the customer pays = \(83.33 \times 1.08 =\) $90.00.
Margin to Markup Conversion Table
Gross margin is measured against the selling price, while markup is measured against cost. The same price can therefore be described by two different percentages. The conversions are \(\text{Markup} = \frac{m}{1-m}\) and \(\text{Multiplier} = \frac{1}{1-m}\), where \(m\) is the margin as a decimal. The multiplier is applied to cost to get the pre-tax selling price.
| Gross Margin | Equivalent Markup on Cost | Selling Price Multiplier |
|---|---|---|
| 10% | 11.1% | 1.111 |
| 20% | 25% | 1.250 |
| 25% | 33.3% | 1.333 |
| 30% | 42.9% | 1.429 |
| 40% | 66.7% | 1.667 |
| 50% | 100% | 2.000 |
| 60% | 150% | 2.500 |
Example: a 40% margin means the price is cost × 1.667, which is the same as a 66.7% markup. Applying a 40% markup instead would give only a 28.6% margin.
Scenario Comparison: Margin and Tax Rate Combinations
All rows use a fixed cost of $50. Selling price = Cost ÷ (1 − Margin), and Final price = Selling price × (1 + Tax rate). The tax rates are illustrative only, since sales tax rates vary by country, state and product type.
| Margin / Tax | Selling Price (pre-tax) | Profit | Tax Amount | Final Price |
|---|---|---|---|---|
| 20% / 5% | $62.50 | $12.50 | $3.13 | $65.63 |
| 30% / 6% | $71.43 | $21.43 | $4.29 | $75.71 |
| 40% / 8% | $83.33 | $33.33 | $6.67 | $90.00 |
| 50% / 10% | $100.00 | $50.00 | $10.00 | $110.00 |
Values are calculated from unrounded figures and then rounded to cents, so a row may differ by one cent when you add the rounded columns. Example for the 40% / 8% row: \(\frac{50}{1-0.40} = 83.33\), then \(83.33 \times 1.08 = 90.00\). Tax is charged on the selling price and has no effect on your profit.
Key Terms: Margin, Markup, Gross Profit and Sales Tax
- Cost: What you pay to acquire or produce one unit, before any profit or tax is added.
- Gross margin: Gross profit as a percentage of the selling price: \(\frac{\text{Price} - \text{Cost}}{\text{Price}} \times 100\).
- Markup: Gross profit as a percentage of cost: \(\frac{\text{Price} - \text{Cost}}{\text{Cost}} \times 100\). For any profitable item, markup is higher than margin.
- Gross profit: Selling price minus cost, before overhead, wages and other operating expenses.
- Selling price (pre-tax): The price you set, equal to Cost ÷ (1 − Margin). This is the amount that counts as your revenue.
- Sales tax rate: The percentage a government charges on a sale. Rates and rules vary by country, region and product category.
- Tax-inclusive price: The final amount the customer pays: selling price × (1 + tax rate).
Sales tax is collected on behalf of the government and passed on to it. It is not part of your revenue or profit, so you should keep it out of margin calculations. This is general information, not tax or accounting advice.
FAQ
Is margin the same as markup? No. Markup is profit as a percentage of cost; margin is profit as a percentage of selling price. A 40% margin is a higher dollar amount than a 40% markup.
Why divide by (1 − margin)? Because margin is based on the price you don't know yet. Rearranging \(\text{Margin} = (\text{Price} - \text{Cost})/\text{Price}\) gives \(\text{Price} = \text{Cost} / (1 - \text{Margin})\).
Can I use a 0% tax rate? Yes. Set the tax rate to 0 and the final price will equal the pre-tax selling price.