Sale Price Calculator Formula

Understand the math behind the sale price calculator. Each variable explained with a worked example.

Formulas Used

Sale Price (before tax)

sale_price = discounted_price

Sales Tax

tax_amount = discounted_price * tax_rate / 100

Total After Tax

out_the_door = discounted_price * (1 + tax_rate / 100)

Variables

VariableDescriptionDefault
retail_priceRetail Price(USD)149.99
markdown_pctMarkdown Percentage(%)30
tax_rateSales Tax Rate(%)8
discounted_priceDerived value= retail_price * (1 - markdown_pct / 100)calculated

How It Works

How to Calculate a Sale Price

The sale price is the original retail price reduced by the markdown percentage, with optional sales tax applied afterward.

Formula

Sale Price = Retail Price x (1 - Markdown% / 100)

Total = Sale Price x (1 + Tax Rate / 100)

Worked Example

A $149.99 pair of shoes is 30% off with 8% sales tax.

retail_price = 149.99markdown_pct = 30tax_rate = 8
  1. 01Markdown multiplier: 1 - 30/100 = 0.70
  2. 02Sale price = $149.99 x 0.70 = $104.99
  3. 03Tax = $104.99 x 0.08 = $8.40
  4. 04Total out-the-door = $104.99 + $8.40 = $113.39

Frequently Asked Questions

Is tax calculated before or after the discount?

Sales tax is calculated on the discounted price, not the original price. The discount reduces your taxable amount.

What is the difference between markdown and discount?

They are essentially the same: both reduce the price by a percentage. Markdown is more commonly used by retailers, while discount is the consumer-facing term.

How do I calculate the original price from a sale price?

Divide the sale price by (1 - markdown%/100). For example, if a 30%-off item costs $104.99, the original is $104.99 / 0.70 = $149.99.

Ready to run the numbers?

Open Sale Price Calculator