Tabellab

You are not signed in — the lab works, but your progress is not saved. Sign up

Lesson 1 of 20 is free. Unlock all 20 hands-on labs, the final exam and your certificate.

Buy course — $9.90
Loading the spreadsheet…

The spring-sale question every shop owner asks

Every finance job starts with percentages. Before anyone talks about models, forecasts or valuation, someone has to price a product, apply a discount and check that the business still makes money. It sounds easy, and that is exactly why it goes wrong so often: a markup and a discount look like they cancel out, a tax rate gets applied to a total that already contains tax, and a formula copied down a column quietly points at the wrong cells. This lesson is for anyone who works with prices and margins in Excel, whether you are a junior analyst, a bookkeeper, a small-business owner or a student preparing for a finance role.

The case is a fictional garden shop, Saltmarsh Home & Garden, planning its spring sale. The owner wants to know one thing: can we put 40 % off the folding bistro table? It feels safe, because the table already carries a 50 % markup. In the lab above you price 16 products from their unit cost, apply each planned promo discount, calculate the margin that is left, colour the weak products with a traffic-light icon set, chart the result and work out the sales tax hidden in a receipt. By the end you will have answered the owner's question with numbers, not gut feeling, and you will have the formulas to answer it again next season in seconds.

Percentages in Excel are just numbers

The first thing to understand is that Excel does not have a special "percent" type. A percentage is a decimal number with a display format. When you type 40% into a cell, Excel stores 0.4 and formats it to look like 40 %. When you type 0.4 and press Ctrl + Shift + %, you get the same cell. That is why formulas such as =D2*(1-E2) work: if E2 holds 0.4, then 1-E2 is 0.6, and the sale price is 60 % of the list price.

Three terms come up in every pricing conversation, and mixing them up is the root of most margin mistakes:

  • Markup on cost is added on top of what you paid. Cost 54.00 with a 50 % markup gives a list price of 54.00 × 1.5 = 81.00. Formula: =B2*(1+C2).
  • Discount is taken off the list price. 81.00 with 40 % off gives 81.00 × 0.6 = 48.60. Formula: =D2*(1-E2).
  • Margin on sale price is the profit as a share of the price the customer actually pays. (48.60 − 54.00) ÷ 48.60 = −11.1 %. Formula: =(F2-B2)/F2.

Notice what happened. Plus 50 % and minus 40 % does not leave you 10 % ahead, because the two percentages are taken from different base numbers. The 50 % is calculated on the cost of 54.00, the 40 % on the much larger list price of 81.00. In multipliers: 1.5 × 0.6 = 0.9, so the sale price is only 90 % of the cost. The table loses 5.40 every time it sells.

You will often need to convert between the two views, because buyers think in markup and finance reports think in margin. The conversions are short: margin = markup ÷ (1 + markup) and markup = margin ÷ (1 − margin). A 50 % markup is a 33.3 % margin, and a target margin of 40 % needs a markup of 0.4 ÷ 0.6 = 66.7 %. In Excel: =C2/(1+C2) and =G2/(1-G2). Margin is the number that appears in income statements, because it tells you how much of every unit of revenue is left after the cost of the goods.

Folding bistro table: +50 % then −40 % ends below cost02040608054.00Unit cost=B981.00List price=B9*(1+C9)48.60Sale price=D9*(1-E9)cost line 54.00−5.40+50 % markup−40 % discount
The bistro table's price path. A 50 % markup lifts the cost of 54.00 to 81.00, the 40 % discount brings it down to 48.60, below the dashed cost line.

Cell references: one formula for sixteen products

You could calculate the bistro table on a calculator. The point of Excel is that you write one formula and use it for every product. In D2 you write =B2*(1+C2), which means "the cost in this row times one plus the markup in this row". When you copy D2 down to D17, Excel adjusts the row number in every copy: D3 becomes =B3*(1+C3), D9 becomes =B9*(1+C9). These are relative references, and they are why a price list with 16 or 16,000 rows takes the same effort.

The brackets are not optional. Excel follows the standard order of operations: multiplication and division before addition and subtraction. =B9*1+C9 is read as (54 × 1) + 0.5 = 54.50, which is the cost plus fifty cents, not plus fifty percent. =B9*(1+C9) forces Excel to add first and gives the correct 81.00. When a result looks only slightly bigger than the cost, missing brackets are the first thing to check.

Worked example: all 16 products of the spring sale

Here is the finished table from the lab. Columns B, C and E are the inputs; D, F and G are calculated with the three formulas above, copied down. The last column shows the traffic light the icon set gives each product with Number thresholds of 0.30 and 0.15. All products and numbers are fictional.

Saltmarsh spring sale. D: =B2*(1+C2), F: =D2*(1-E2), G: =(F2-B2)/F2
ProductUnit cost (B)Markup (C)List price (D)Discount (E)Sale price (F)Margin (G)Light
Ceramic plant pot 30 cm12.4080 %22.3210 %20.0938.3 %green
Garden hose 25 m18.5060 %29.6025 %22.2016.7 %yellow
Solar path lights (4-pack)9.80100 %19.6030 %13.7228.6 %yellow
Pruning shears14.2075 %24.8515 %21.1232.8 %green
Bird feeder7.6090 %14.440 %14.4447.4 %green
Outdoor seat cushion11.3070 %19.2135 %12.499.5 %red
Rattan lounge chair96.0045 %139.2020 %111.3613.8 %red
Folding bistro table54.0050 %81.0040 %48.60-11.1 %red
Watering can 10 L6.90110 %14.4910 %13.0447.1 %green
Potting soil 40 L4.8055 %7.445 %7.0732.1 %green
Raised bed kit38.5065 %63.5225 %47.6419.2 %yellow
Herb seed set3.20150 %8.0020 %6.4050.0 %green
Glass lantern15.6085 %28.8630 %20.2022.8 %yellow
Wheelbarrow42.0040 %58.8015 %49.9816.0 %yellow
Patio umbrella 3 m61.0055 %94.5530 %66.187.8 %red
Garden gloves2.90120 %6.3810 %5.7449.5 %green

Four products end up red, below a 15 % margin: the outdoor seat cushion (9.5 %), the patio umbrella (7.8 %), the rattan lounge chair (13.8 %) and the folding bistro table (−11.1 %). Only one of them, the bistro table, is negative. The other three still earn something on every sale, just not much. That distinction matters: a thin margin can be a deliberate choice to bring customers into the shop, a negative margin means every extra unit sold makes the loss bigger.

Margin on sale price after the spring discount-20 %-10 %0 %10 %20 %30 %40 %50 %60 %15 %30 %Herb seed set50.0 %Garden gloves49.5 %Bird feeder47.4 %Watering can 10 L47.1 %Ceramic plant pot 30 cm38.3 %Pruning shears32.8 %Potting soil 40 L32.1 %Solar path lights (4-pack)28.6 %Glass lantern22.8 %Raised bed kit19.2 %Garden hose 25 m16.7 %Wheelbarrow16.0 %Rattan lounge chair13.8 %Outdoor seat cushion9.5 %Patio umbrella 3 m7.8 %Folding bistro table-11.1 %
Margin on sale price per product, sorted largest first. Colours follow the traffic-light rule: mint from 30 %, butter from 15 %, peach below 15 %. The bistro table is the only bar pointing left.

The rule that answers the owner's question

There is a neat link between markup and discount. The largest discount you can give without selling below cost equals your margin on the list price, which you get from the markup with =markup/(1+markup). For a 50 % markup that is 0.5 ÷ 1.5 = 33.3 %. Check: 81.00 × (1 − 0.333…) = 54.00, exactly the cost. Anything beyond 33.3 % off loses money. A 100 % markup (doubling the cost) survives at most 50 % off, and a 200 % markup survives at most 66.7 %.

Reference table from rows 24–31 of the lab
Markup on costMargin on price = max. discountFormula in column C
10 %9.1 %=B25/(1+B25)
25 %20.0 %=B26/(1+B26)
50 %33.3 %=B27/(1+B27)
75 %42.9 %=B28/(1+B28)
100 %50.0 %=B29/(1+B29)
150 %60.0 %=B30/(1+B30)
200 %66.7 %=B31/(1+B31)

Markup on cost vs largest safe discount0 %50 %100 %150 %200 %109.1+10 %2520.0+25 %5033.3+50 %7542.9+75 %10050.0+100 %15060.0+150 %20066.7+200 %Markup on costMargin on price = largest discount without a loss
The higher the markup, the bigger the gap to the safe discount. Doubling the cost (+100 %) allows at most 50 % off.

So the answer to the owner is: no, not at 40 %. With its 50 % markup the bistro table can go to about 33 % off and break even. If the goal is a visible sale price with some profit left, a discount of 20 % or 25 % keeps a margin of roughly 17 % or 11 %. You can test that yourself in the lab by changing E9 and watching F9, G9, the traffic light and the chart update instantly. This is what finance people mean when they say a spreadsheet should be a model, not a list of results.

Bonus: the sales tax hidden inside a total

The lab ends with a receipt for 864.00 that already includes sales tax at an example rate of 8 %. The tempting formula is =B20*B21, which gives 69.12. That is wrong, because the 8 % applies to the net amount, not to the total. The total is 108 % of the net amount, so the net is =B20/(1+B21) = 800.00 and the tax is =B20*B21/(1+B21) = 64.00. The same logic works for VAT, GST or any other tax that is quoted on top of a net price. Check your result by adding it up again: 800.00 + 64.00 = 864.00.

Build it so someone else can check it

In finance, a sheet is rarely just for you. A manager, an auditor or your future self will open it later and ask where a number comes from. A few habits make that easy. Keep the inputs (cost, markup, discount, tax rate) in their own cells and give them a visible style, for example a light fill colour, so everyone sees what may be changed. Keep every calculated cell a formula, with no typed numbers inside it: =B20*B21/(1+B21) is auditable, =864*0.08/1.08 is not, because nobody can see that 0.08 is the rate in B21. Label assumptions clearly, the way the lab marks the 8 % as an example rate. And use one formula per column, copied down, rather than slightly different formulas in different rows. When every row follows the same pattern, an error in one row stands out immediately.

Two built-in tools help you check a sheet you did not build yourself. Formulas › Trace Precedents draws arrows from the cells a formula uses, so you can see at a glance that G9 depends on F9 and B9. Formulas › Evaluate Formula steps through a calculation one operation at a time, which is the quickest way to see why =B9*1+C9 returns 54.50.

Step by step in Excel

  1. Enter the product names, unit costs, markups and discounts in A2:C17 and E2:E17. Type markups and discounts as 50% or as 0.5 and format them with Home › Number › Percent Style (Ctrl + Shift + %).
  2. In D2 type =B2*(1+C2) and press Enter. Select D2 and double-click the fill handle to copy it down to D17.
  3. In F2 type =D2*(1-E2) and copy it down the same way.
  4. In G2 type =(F2-B2)/F2, copy it down and format G2:G17 as a percentage with one decimal (Home › Number › Increase Decimal).
  5. Format D2:F17 as currency or as a number with two decimals (Ctrl + Shift + ! on Windows). Formatting only changes the display, the full value is still used in calculations.
  6. Select G2:G17 and choose Home › Conditional Formatting › Icon Sets › 3 Traffic Lights. Then open Conditional Formatting › Manage Rules › Edit Rule, set both Type boxes to Number and enter 0.3 for green and 0.15 for yellow.
  7. Select A1:A17, hold Ctrl (Mac: Cmd) and select G1:G17. Choose Insert › Charts › Insert Column or Bar Chart › Clustered Bar.
  8. Sort for a readable chart: Excel draws the first row of a bar chart at the bottom. Either sort the data smallest to largest (Data › Sort) or right-click the vertical axis, choose Format Axis and tick Categories in reverse order, so the strongest margins appear at the top.
  9. In B22 type =B20*B21/(1+B21) for the tax contained in the receipt.
  10. Press Ctrl + ` to show all formulas and check that every calculated cell really is a formula, not a typed number.
Want to see how sensitive the result is? Click E9 and type 33.3% or 25%. Because every cell downstream is a formula, the sale price, margin, traffic light and chart all update at once. Doing that by hand with a calculator for 16 products would take far longer and is easy to get wrong.

Excel for Finance course illustration: a price list with markups, discounts and margin percentages in a spreadsheet
Excel for Finance: the formulas every finance job uses, practised in a live spreadsheet that checks your work.

Common mistakes and how to spot them

  • Missing brackets. =B9*1+C9 returns 54.50 instead of 81.00. Spot it: a list price that is only cents above the cost.
  • Subtracting percentages. 50 % markup − 40 % discount is not a 10 % margin. Spot it: if your margin formula uses only columns C and E, it ignores the prices. Margin must come from the prices: =(F2-B2)/F2.
  • Dividing by cost instead of price. =(F2-B2)/B2 is a markup-style ratio, not a margin. Spot it: your "margin" can exceed 100 %, which a real margin on price never can.
  • Using the discount amount as the price. =D9*E9 gives 32.40, the amount taken off, not the price the customer pays. Spot it: heavily discounted items look cheap and lightly discounted ones look almost free.
  • Taking tax as a plain percentage of a gross total. =864*8% overstates the tax. Spot it: net plus tax should add back to the gross total exactly.
  • Typed results. A typed 81.00 in D9 looks fine until the supplier raises the cost. Spot it with Formulas › Show Formulas.
  • Percent-based icon thresholds. If the icon set uses "Percent" instead of "Number", the lights depend on the spread of the data, not on your 15 % and 30 % rules. Spot it: lights change when you add or remove a product.

Quick reference

Formula or shortcutWhat it doesExample
=cost*(1+markup)Price after a markup=B9*(1+C9) → 81.00
=price*(1-discount)Price after a discount=D9*(1-E9) → 48.60
=(price-cost)/priceMargin on sale price=(F9-B9)/F9 → −11.1 %
=markup/(1+markup)Margin on price, also the largest discount without a loss=B27/(1+B27) → 33.3 %
=gross*rate/(1+rate)Tax contained in a gross total=B20*B21/(1+B21) → 64.00
=gross/(1+rate)Net amount before tax=B20/(1+B21) → 800.00
Ctrl + Shift + %Percent formatC2:C17, E2:E17, G2:G17
Double-click fill handleCopy a formula down to the end of the dataD2 → D3:D17
Home › Conditional Formatting › Icon SetsTraffic lights by ruleG2:G17, Number 0.3 / 0.15
Ctrl + `Show formulas instead of resultsAudit the whole sheet

Real-world uses

  • Retail and e-commerce promotions: before a sale goes live, calculate the margin left on every item and flag anything that falls below a minimum or below cost.
  • Quoting and pricing in B2B: start from cost, apply a target markup, then check what a negotiated discount does to the margin before you agree to it.
  • Financial planning and analysis: margin bridges and price-volume analyses all start with the same three formulas, applied to thousands of rows instead of sixteen.
  • Accounts and bookkeeping: splitting a gross receipt into net amount and tax with =gross/(1+rate) and =gross*rate/(1+rate) is a daily task.
  • Procurement: when a supplier raises the cost, an input-driven price list shows instantly which products need a new list price to keep their margin.

What you will build in the rest of this course

The next 19 lessons follow the same pattern: a realistic business case, a live sheet that checks every cell, and the formulas you will meet in real finance work.

Absolute references ($). You build an order in which every row uses one tax-rate cell. You learn why a copied formula sometimes breaks, how the dollar sign and the F4 key lock a reference, and how to change one rate and update a whole document.

SUM, AVERAGE, MIN & MAX. You summarise a year of café revenue in four numbers: the total, a typical month, the best and the weakest month, the summary every report opens with.

IF and nested IF. You add a late fee to overdue invoices and assign a reminder level to every customer, letting the spreadsheet apply your collection rules consistently.

SUMIFS & COUNTIFS. You answer four management questions from a sales list, such as revenue by region and product, without filtering or sorting anything by hand.

VLOOKUP & XLOOKUP. You price an order by looking up each item number in a price list, the classic task that links two tables, and learn why XLOOKUP is the safer choice today.

ROUND & MROUND. You round tax to the cent and round cash totals to the nearest 0.05, and see why formatting a number is not the same as rounding it.

Dates, payment terms & early-payment discount. You calculate due dates from invoice dates and payment terms and decide which invoices qualify for a 2 % early-payment discount, a typical accounts payable decision.

Summary

Percentages in Excel are decimals with a format. Markup is added on cost with =cost*(1+markup), a discount is taken off the list price with =price*(1-discount), and margin is the profit as a share of the sale price, =(price-cost)/price. Because the percentages apply to different base numbers, they do not simply cancel: a 50 % markup only survives a 33.3 % discount, so the bistro table at 40 % off loses 5.40 per sale. Tax inside a gross total is =gross*rate/(1+rate), not gross*rate.

Scroll up to the lab and price the spring sale yourself. Seven tasks, about fifteen minutes, and every formula, icon set and chart is checked as you go. Then change a discount and watch the whole sheet react.

Frequently asked questions

How do I calculate a price with a markup in Excel?

Multiply the cost by one plus the markup: =B2*(1+C2). With a cost of 54.00 and a 50 % markup in C2 this returns 81.00. The brackets are required, because Excel multiplies before it adds.

How do I calculate a discounted price in Excel?

Multiply the list price by one minus the discount: =D2*(1-E2). A 40 % discount on 81.00 gives 48.60. =D2*E2 would only return the discount amount.

What is the difference between markup and margin?

Markup is the profit as a share of the cost, margin is the profit as a share of the selling price. A 50 % markup equals a 33.3 % margin, because margin = markup / (1 + markup).

How do I calculate profit margin percentage in Excel?

Use =(price-cost)/price, for example =(F2-B2)/F2, and format the cell as a percentage. Dividing by the cost instead gives a markup, not a margin.

How do I extract sales tax or VAT from a total that already includes it?

Use =total*rate/(1+rate). For 864.00 at an example rate of 8 % that is 64.00, and the net amount is =total/(1+rate), 800.00. Taking 8 % of the total overstates the tax.

Why does 50 % markup and 40 % discount lose money?

The markup is applied to the cost, the discount to the larger list price. In multipliers 1.5 × 0.6 = 0.9, so the sale price is only 90 % of the cost.

Keep going: Excel for Finance

This free lab is lesson 1 of 20. Unlock the other 19 hands-on labs, the final exam and your certificate for a one-time $9.90.

  1. Absolute references ($)
  2. SUM, AVERAGE, MIN & MAX
  3. IF and nested IF
  4. SUMIFS & COUNTIFS
  5. VLOOKUP & XLOOKUP
  6. ROUND & MROUND
  7. Dates, payment terms & early-payment discount
  8. Budget vs actual: variances in $ and %, favourable or unfavourable
  9. INDEX & MATCH: a two-way lookup of exchange rates
  10. Running balances: a cash book that shows what is left
  11. Receivables aging: days past due, buckets & an approximate lookup
  12. SUMPRODUCT & weighted averages: average cost, interest rate & margin
  13. Break-even analysis: contribution margin, break-even point & margin of safety
  14. Check your own work: cross-footing, tie-outs & IFERROR
  15. Project: a quarterly management report from raw transactions
  16. Price, volume & mix: why revenue beat the budget
  17. Allocating shared costs: rent, IT and HR by driver
  18. Sensitivity: a price × volume profit grid and the price you need
  19. Final project: a 13-week cash forecast with a buffer and a credit-line need

Buy course — $9.90 See the full course