Skip to content
Finance

Margin and Sales Tax Calculator

Enter your cost, desired gross margin, and local sales tax rate to instantly see the pre-tax selling price, the sales tax amount, the final customer price, and your dollar profit. Switch between tax-exclusive (tax added at checkout) and tax-inclusive (price already contains tax) modes. The step panel shows every calculation so you can verify the math or adapt it to your own spreadsheet.

Your details

Tax-exclusive: the selling price is shown before tax and tax is added on top at the point of sale. Tax-inclusive: the quoted price already embeds the tax, common in retail and VAT countries.
The total landed cost of the product or service before any markup or tax. Include materials, labour, shipping, and any other direct costs.
USD
Gross margin is profit divided by selling price, expressed as a percentage. A 40% margin means 40 cents of every dollar of revenue is gross profit.
%
The sales tax, GST, or VAT rate that applies to this sale. Set to 0 if your product is tax-exempt or you sell in a jurisdiction with no sales tax.
%
Selling price (pre-tax)Healthy margin
83.33

The price charged before any tax is added

Sales tax amount6.67
Final price (with tax)90
Gross profit33.33
Gross margin0.4%
Markup0.67%
Selling price83.33
Gross profit33.33
Tax6.67
Final price90

Gross margin of 40.0% on a $50.00 cost

  • Your selling price of $83.33 yields $33.33 in gross profit on a $50.00 cost.
  • The customer pays $90.00 in total, of which $6.67 is sales tax that you remit to the government.
  • Markup (66.7%) and margin (40.0%) measure different things: markup is profit over cost, margin is profit over revenue.

Next stepGross margin covers only direct costs. Subtract operating expenses (rent, salaries, marketing) to find your net profit margin.

Margin vs. markup: why they are not the same

Margin and markup are both ways to express profit, but they use a different denominator. Gross margin is profit divided by the selling price: if you sell a product for $100 and your cost was $60, the margin is $40 / $100 = 40%. Markup is profit divided by cost: the same $40 profit on a $60 cost gives a markup of 66.7%. This distinction matters in practice. Pricing to a target margin of 40% is not the same as marking up by 40%: a 40% markup on a $60 cost gives a $84 selling price (margin of only 28.6%), while a 40% margin on a $60 cost gives a $100 selling price. Many small businesses underprice their products because they confuse markup with margin.

How sales tax interacts with your margin

Sales tax does not directly reduce your gross margin because it flows through to the government rather than staying in your revenue. In tax-exclusive pricing (the most common model in the United States), you quote a pre-tax selling price, collect the tax from the customer on top of that price, and remit the collected tax to the relevant authority. Your gross profit calculation uses only the pre-tax selling price minus cost. In tax-inclusive pricing, common in retail and in VAT jurisdictions such as Europe and Australia, the price you display already contains the tax. In this case you need to back the tax out of the displayed price to find the actual revenue that belongs to you, and then calculate margin from that revenue figure. This calculator handles both modes automatically.

Choosing the right margin for your business

Gross margin is not net profit. Before your gross profit turns into actual profit you must cover rent, salaries, marketing, payment processing fees, returns, shrinkage, interest, and taxes on income. As a rough rule, your gross margin must be at least high enough to absorb all of those operating costs and still leave a target net profit. Retailers often aim for 40-60% gross margin to fund their operating structure. Software and SaaS businesses typically run 70-85% gross margins. Manufacturers operate much leaner, often 20-40%, making volume the key lever. Use the industry benchmarks in the table above as a starting point, then build a bottom-up model of your own operating expenses to set your specific target.

Using this calculator for pricing decisions

Start by entering your total landed cost: this should include every cost that is directly tied to producing or acquiring the item, such as raw materials, manufacturing labour, inbound freight, import duties, and packaging. Do not include fixed overheads at this stage (that is a net-margin exercise). Then enter your target gross margin. The calculator shows you the selling price you need to achieve that margin. Finally, enter the applicable sales tax rate for your market. The final-price output tells you what the customer will actually pay, which is useful for competitive price checks and for setting list prices on your website or marketplace. You can also reverse the process: if you know what competitors charge (the final price) and the tax rate, you can work backwards to find the implied margin at your cost.

Gross margin benchmarks by industry

IndustryTypical gross marginNotes
Software / SaaS 70-85% High margin, low variable cost
Professional services 50-70% Labour-intensive but scalable
Retail (specialty) 40-60% Varies by product category
E-commerce / DTC 30-50% Includes shipping and returns
Restaurants 60-70% Food cost typically 30-40%
Manufacturing 20-40% High material and labour cost
Grocery / food retail 20-30% High volume, low margin
Construction 15-25% Material and subcontractor costs

Typical gross margin ranges for common industries. Operating margins will be lower after subtracting overhead and other fixed costs.

Frequently asked questions

What is the difference between margin and markup?

Margin is gross profit divided by selling price. Markup is gross profit divided by cost. For the same transaction they will always give different percentages. A 50% markup on a $100 cost gives a $150 selling price and a 33.3% margin. A 50% margin on a $100 cost gives a $200 selling price and a 100% markup. Always be clear which one you are using when setting prices.

Does sales tax reduce my profit margin?

No, in a standard tax-exclusive setup. You collect sales tax from the customer and pass it directly to the government, so it never enters your revenue or profit calculation. Your gross margin is calculated on the pre-tax selling price. In tax-inclusive pricing you need to strip out the embedded tax first to find your true revenue, otherwise your margin calculation will be artificially lower than it really is.

What is tax-inclusive vs. tax-exclusive pricing?

Tax-exclusive means the price you advertise does not include tax. Tax is added at the point of sale. This is the norm in the United States. Tax-inclusive means the displayed price already contains the tax - the customer pays exactly that amount with no addition at checkout. This is required in most of Europe and Australia under their VAT and GST regimes. This calculator supports both modes.

How do I calculate the selling price from a desired margin?

The formula is: Selling price = Cost / (1 - Margin). So if your cost is $60 and you want a 40% margin, the selling price is $60 / (1 - 0.40) = $60 / 0.60 = $100. You can verify: profit is $100 - $60 = $40, and $40 / $100 = 40% margin.

What is a good gross margin?

It depends entirely on the industry and business model. Software and SaaS companies often exceed 70-80%. Specialty retailers target 40-60%. Grocery and food retail often operates below 30%. What matters most is whether your gross margin is high enough to cover your operating expenses and still leave a target net profit. Review the industry benchmarks in the table on this page as a starting point.

Is a 40% margin the same as a 40% markup?

No. A 40% margin means you keep 40 cents of every dollar of revenue. A 40% markup means you add 40 cents to every dollar of cost. If your cost is $100, a 40% markup gives a $140 selling price (margin of 28.6%). A 40% margin on a $100 cost gives a $166.67 selling price (markup of 66.7%). Confusing these two is one of the most common pricing mistakes.

Sources

Written by Sarah Klein, CFP Certified Financial Planner · Chicago, USA

Fifteen years translating mortgage tables and amortization schedules into decisions that actually help real borrowers.

How we build & check our calculators

This tool provides general information and education, not professional advice. For decisions about your health or finances, consult a qualified professional.

Search 3,500+ calculators

Loading search…