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

Ready to run the numbers?

Open Sale Price Calculator