# Margin and Sales Tax Calculator

URL: https://speedycalculator.com/calculators/finance/margin-sales-tax/
Last updated: 2026-10-25

> The margin and sales tax calculator works out the selling price before and after sales tax from your cost and either the margin or markup you want – plus the tax amount and your profit.

## Inputs

- Cost
- Pricing by
- Margin / markup (%)
- Sales tax (%)

## Results

- Net price (before tax)
- Sales tax
- Gross price (with tax)
- Profit
- Margin
- Markup

## Formula

```
Net price = cost ÷ (1 − margin) or cost × (1 + markup)
Sales tax = net price × tax rate
Gross price = net price + sales tax
Profit = net price − cost
```

## Explanation

In the U.S. prices are usually shown before sales tax, which is added at checkout. Your margin is calculated on the net price – sales tax is collected for the state, not income.

### How to use the Margin and Sales Tax Calculator

- **Cost**
- **Pricing by**
- **Margin / markup**
- **Sales tax**

Results update as you type, and every field accepts the units shown in its menu.

### How it works

Enter the cost, choose margin or markup and its percentage, and the sales tax rate.

### Tips

- Know the difference between margin (profit ÷ price) and markup (profit ÷ cost).
- Apply successive discounts one after another – they do not simply add up.
- Check whether prices already include sales tax or VAT.
- Round prices only at the very end of the calculation.

### Common mistakes to avoid

- Adding discount percentages together.
- Pricing from a target margin using the markup formula.
- Forgetting payment-processing and shipping fees.

### Inputs explained

FieldWhat to enterCostAmount in your currencyPricing byChoose one: Margin, MarkupMargin / markupIn %Sales taxIn %

### What each result means

- **Sales tax** = [Net price (before tax)]×[Sales tax]÷100
- **Gross price (with tax)** = [Net price (before tax)] + [Sales tax]
- **Profit** = [Net price (before tax)] - [Cost]
- **Margin** = [Profit]÷[Net price (before tax)]×100
- **Markup** = [Profit]÷[Cost]×100

### Example values

How the main result changes when **Cost** changes and everything else stays at the example values above:

CostGross price (with tax)2033.313049.964066.625083.276099.9280133.23

## Worked example

Inputs — Cost: $40; Pricing by: Margin; Margin / markup: 35 %; Sales tax: 8.25 %.

Results — Net price (before tax) = $61.54; Sales tax = $5.08; **Gross price (with tax) = $66.62**; Profit = $21.54; Margin = 35 %; Markup = 53.85 %.

## FAQ

**Is sales tax included in my margin?**
No – margin is calculated on the price before tax.

**Who pays sales tax?**
The buyer; the seller collects and remits it.

**How do I price to include tax?**
Add tax to the net price; in the U.S. it's usually added at checkout.

**What formula does the Margin and Sales Tax Calculator use?**
Net price = cost ÷ (1 − margin) or cost × (1 + markup).

