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…

Who this lesson is for

You run marketing for a shop, a brand or a client, and every quarter somebody asks the same question: which part of our advertising actually worked? The ad platforms each report their own numbers, the numbers add up to more sales than you really had, and cookie-based tracking misses a growing share of customers. Marketing mix modeling (MMM) is the old, sturdy answer to that question. It does not follow single users. It looks at weekly totals, sales on one side and spend per channel on the other, and asks how much of the sales line moves when each spend line moves.

This free first lesson is the exploration step that every serious MMM project starts with. You work with sixteen weeks of data from Larkspur Tea Co., a fictional online tea retailer that advertises on TV, paid search and social media. Before you fit any model you learn to answer four plain questions in Excel: how much money went where, how the budget is split, whether sales move with each channel at all, and how sales in TV weeks compare with sales in weeks without TV. You finish with the chart that every media analyst draws first: sales as columns, TV spend as a line on a second axis.

No statistics background is needed. If you can write =SUM() and copy a formula down, you can do this lab. The sheet above is live: you type the formulas, the Coach checks every answer and tells you what went wrong if a number is off.

What marketing mix modeling actually does

Think of a week of sales as a stack of building blocks. At the bottom sits the base: the sales you would make with no advertising at all, thanks to your brand, your repeat customers, your listing on search results, the season. On top of the base sit the incremental sales that each channel adds: a slice from TV, a slice from search, a slice from social. MMM estimates how big each slice is, week by week, from history.

To do that it needs variation. If you spent exactly the same amount on every channel every week, there would be nothing to learn, because nothing would ever change. Larkspur is a good case for learning because its TV runs in flights: three or two weeks on air, then a few weeks dark. Search and social run all the time, at slightly different levels. Those on-and-off patterns are what a model later uses to separate the channels from each other and from the base.

Two features make media data harder than a simple regression textbook example, and the rest of this course deals with both. First, advertising carries over: a TV spot seen on Sunday can still sell tea on the following Thursday, and the week after the flight is often stronger than a normal dark week. Second, returns are diminishing: the first thousand dollars on search buys the cheapest, most interested clicks, the next thousand buys more expensive ones. Exploration is where you first see hints of both, so you know what to model.

Why not just trust the platform dashboards? Each platform credits itself for any sale it touched, so the credited sales of all channels together usually exceed the actual sales. MMM starts from the real sales total and divides it, so the parts can never add up to more than the whole. It also works without user-level tracking, which makes it robust to consent banners and privacy changes. Its weakness is that it needs enough weeks of history and enough variation in spend, and that it gives estimates with uncertainty, not exact truths.

That is why the first lab is about looking, not modelling. You will check that the data is complete, see which channels dominate the budget, and form a hypothesis that the later labs test.

The Larkspur data: sixteen weeks at a glance

Here is the data you find in the lab, with the total spend per week already filled in so you can compare your own column F with it. All numbers are fictional and made up for teaching.

WeekSalesTVSearchSocialTotal spend (F)
W1$112,670$30,000$5,200$3,500$38,700
W2$134,420$30,000$5,600$4,200$39,800
W3$138,980$30,000$6,100$3,800$39,900
W4$108,120$0$5,800$4,600$10,400
W5$92,200$0$6,400$3,900$10,300
W6$92,070$0$6,900$4,400$11,300
W7$118,300$25,000$6,300$5,100$36,400
W8$126,470$25,000$5,900$4,700$35,600
W9$135,500$25,000$6,600$3,600$35,200
W10$108,230$0$7,100$4,300$11,400
W11$100,170$0$6,800$4,900$11,700
W12$88,270$0$6,200$5,200$11,400
W13$117,950$30,000$5,700$4,100$39,800
W14$137,500$30,000$6,000$3,700$39,700
W15$108,230$0$6,500$4,500$11,000
W16$95,710$0$6,400$4,800$11,200
Total$1,814,790$225,000$99,500$69,300$393,800

Even before any formula, the pattern is visible. The weeks with $25,000 to $30,000 of TV (W1–W3, W7–W9, W13–W14) are the weeks with sales above roughly $117,000. The dark weeks sit between $88,000 and $108,000. Notice also W4, W10 and W15, the first week after each flight: they sit around $108,000, clearly above the other dark weeks. That is the first hint of carry-over, and it is exactly what the adstock lab picks up later.

Worked example: the four exploration numbers

Here are the formulas you type in the lab, cell by cell, and the results you should see. Try them yourself in the sheet above first and use this table to check your work.

QuestionCellExcel formulaResult
Total spend in week 1F5=SUM(C5:E5)$38,700
16-week total spendF21=SUM(F5:F20) or =SUM(C5:E20)$393,800
TV share of spendC22=C21/$F$2157.1%
Search share of spendD22=D21/$F$2125.3%
Social share of spendE22=E21/$F$2117.6%
Correlation sales vs TVC24=CORREL($B$5:$B$20,C5:C20)0.85
Correlation sales vs SearchD24=CORREL($B$5:$B$20,D5:D20)-0.38
Correlation sales vs SocialE24=CORREL($B$5:$B$20,E5:E20)-0.52
Average sales, TV weeksE26=AVERAGEIF(C5:C20,">0",B5:B20)$127,724
Average sales, no-TV weeksE27=AVERAGEIF(C5:C20,0,B5:B20)$99,125
DifferenceE28=E26-E27$28,599

Spend and mix. Larkspur spent $393,800 in sixteen weeks. TV takes 57.1% of the budget, search 25.3% and social 17.6%. The three shares must add up to 100%. If they do not, you most likely divided by the wrong total or forgot the dollar signs in $F$21, so the denominator slid to the right when you copied the formula.

Correlation. CORREL returns a number between −1 and +1. TV comes out at about +0.85: a strong positive relationship, sales go up when TV is on. Search is about -0.38 and social about -0.52. Read literally, that would say search and social hurt sales. They almost certainly do not. Look at the table again: Larkspur raised search and social a little in the weeks when TV was dark, probably to keep some presence. So search and social are high when sales are low for a reason that has nothing to do with search or social themselves. The correlation picks up the TV schedule, not the effect of the channel.

On/off comparison. The eight TV weeks average $127,724 in sales, the eight weeks without TV average $99,125. The difference is $28,599 per week. It is a handy sanity check, but it is not the TV effect either. The no-TV group includes the strong post-flight weeks, which still carry TV impact, so the difference understates TV. And the two groups differ in search and social spend too, which muddies it in the other direction. Treat the number as a first, rough order of magnitude.

Correlation of weekly sales with channel spendCORREL(sales, spend) over 16 weeks-1.0-0.50+0.5+1.0TV+0.85Search-0.38Social-0.52sales lower when spend is highersales higher when spend is higher
Correlation of weekly sales with each channel. The negative bars for Search and Social do not mean those channels destroy sales: they were turned up in the weeks when TV was off. Correlation reflects the media plan, not the cause.

A quick reality check you can do in your head: TV cost $25,000 to $30,000 per flight week, and TV weeks sell about $28,599 more than dark weeks. Whether that is good or bad depends on your margin and on how much extra the post-flight weeks sell. That is a question for the ROI lab, and you will answer it with a proper model, not with this rough comparison.

Step by step in Excel

  1. Click F5 and type =SUM(C5:E5). Press Enter. This is the total media spend of week 1 (TV + search + social, without the sales column B).
  2. Select F5:F20 and press Ctrl + D to fill the formula down. In F21 type =SUM(F5:F20), or select B21:F21 and press Alt + = for AutoSum.
  3. In C22 type =C21/, click F21 and press F4 until it shows $F$21. Press Enter, then select C22:E22 and press Ctrl + R to fill right. Format as percent with Ctrl + Shift + %.
  4. In C24 type =CORREL($B$5:$B$20,C5:C20). The sales range is absolute because it never changes. Fill right to E24 so the second range moves to D and E.
  5. In E26 type =AVERAGEIF(C5:C20,">0",B5:B20): the average of sales in all weeks whose TV spend is greater than zero. The criterion goes in quotes.
  6. In E27 type =AVERAGEIF(C5:C20,0,B5:B20) for the weeks without TV, and in E28 =E26-E27.
  7. Select A4:C20 (headers included, Total row excluded). Go to Insert › Charts › Insert Combo Chart › Clustered Column – Line on Secondary Axis. If Excel picks the wrong series for the line, right-click the chart, choose Change Chart Type, and in the Combo panel set Sales to Clustered Column and TV ($) to Line with the Secondary Axis box ticked.
  8. Click the chart title and type Weekly sales vs TV spend. Add axis titles via the + button next to the chart (Chart Elements › Axis Titles) on Windows, or Chart Design › Add Chart Element on Mac.

Weekly sales vs TV spend, W1 to W16Sales ($, left axis)TV spend ($, right axis)050k100k150k010k20k30k40kW1W2W3W4W5W6W7W8W9W10W11W12W13W14W15W16SalesTVWeek (TV flights: W1-W3, W7-W9, W13-W14)
The exploration chart for Larkspur Tea Co.: sales columns rise with each TV flight (peach line, right axis) and stay higher in the week after each flight, a first visual hint of carry-over.

Always leave the Total row out of a chart range. A total that is sixteen times larger than any week squashes every column to a flat line, and in a combo chart it also wrecks the secondary axis.

How to read the combo chart

Sales are in dollars and around $100,000 a week. TV spend is $0 or $25,000 to $30,000. On one axis TV would be a low flat line and you would see nothing. The secondary axis gives TV its own scale on the right so the two shapes can be compared directly. Read it like this: whenever the peach line jumps up, do the blue columns jump with it? Do they drop straight back when the line falls to zero, or do they come down more slowly? At Larkspur they step down: the first dark week after each flight is noticeably higher than the following ones.

A combo chart is also the best tool for spotting data problems. A single week where sales spike without any media change is often a promotion, a stock-out recovery or a holiday. Before modelling you would either add a flag column for such weeks or ask the business what happened. A week where sales collapse to near zero might be a site outage or a missing export. Exploration is when you find these, not after the model has been fitted around them.

Marketing mix modeling in Excel: weekly sales and media spend analysis
Marketing mix modeling in Excel: from weekly sales and media spend to channel contributions, ROI and a better budget.

Common mistakes and how to spot them

  • Adding the sales column into total spend. =SUM(B5:E5) mixes revenue with costs. Spot it when F21 is bigger than total sales: spend totals should be a fraction of sales.
  • Shares that do not add to 100%. Usually the denominator is relative (F21 instead of $F$21) and shifts when copied. Check with =SUM(C22:E22).
  • Using RSQ instead of CORREL. RSQ squares the correlation, so it is always positive and smaller. A negative sign disappears, which hides the media-plan pattern you just found.
  • Ranges of different length. CORREL(B5:B20,C5:C21) includes the Total row in one range. Excel returns #N/A for unequal ranges, so check both ranges cover rows 5 to 20.
  • Reading correlation as effect. A negative correlation for search does not mean you should cut search. Ask first what else happened in the same weeks.
  • Comparing TV weeks with all weeks. AVERAGEIF(…">0"…)-AVERAGE(B5:B20) compares a group with itself plus the others. Compare TV weeks with the weeks where TV is zero.
  • Charting the Total row. If one column towers over all others, the range ends one row too low.

Real-world uses

  • Quarterly marketing review. Before you defend the budget, show the mix and the combo chart. Stakeholders understand immediately which channel took the money and when.
  • Checking a TV or video campaign. Compare flight weeks with dark weeks and look at the weeks right after the flight. If nothing moves at all, the creative or the targeting deserves a closer look before the next flight is booked.
  • Auditing an agency report. If an agency claims a channel drove a large share of sales, exploration shows whether sales even move when that channel moves.
  • Planning a test. If two channels are always switched on together, no model can separate them. Exploration tells you to schedule a week where one is on and the other off.
  • Preparing data for a full MMM. Whether you later fit the model in Excel, R or Python, the cleaned weekly table, the mix and the first correlations are the starting point.

Quick reference: functions and shortcuts in this lesson

Function or shortcutWhat it does here
SUM(range)Adds the spend of the three channels per week and the column totals.
$F$21 (absolute reference, press F4)Keeps the denominator fixed when you copy the share formula to the right.
CORREL(array1, array2)Pearson correlation coefficient r between two equally long ranges, from −1 to +1.
PEARSON(array1, array2)Same result as CORREL, older name.
RSQ(known_y, known_x)r squared. Useful later, but not the same number as the correlation.
AVERAGEIF(range, criteria, average_range)Average sales of the weeks whose TV spend meets a condition such as ">0" or 0.
AVERAGEIFS(average_range, range1, crit1, …)Same idea with several conditions, for example TV on and Search above a level.
Alt + = (Windows), Cmd + Shift + T (Mac)AutoSum for the selected cells.
Ctrl + D / Ctrl + RFill down / fill right from the first cell of a selection.
Insert › Charts › ComboClustered column plus line on a secondary axis.

What you will build in the rest of this course

Lesson 1 is free. The lessons below make up the paid course ($9.90, one-time), and each one has its own live lab with the same Larkspur data, so you build a complete marketing mix model step by step in plain Excel.

Adstock: How Advertising Carries Over. You turn the TV schedule into adstock with a geometric decay, so that part of each week's TV pressure rolls into the following weeks. You express the decay as a half-life and a long-run multiplier and see why the post-flight weeks in this lesson were so strong.

Diminishing Returns: The Saturation Curve. You draw the saturation curve of search, compare average and marginal returns, and find the spend level where the next dollar stops paying for itself. This is the idea behind every "we are overspending on this channel" conversation.

Fitting the Model: Regression with LINEST. You fit sales = base + TV adstock + search + social with LINEST, read the coefficients in the right (reversed) order, check R² and draw fitted against actual sales. It is the heart of the course, and it replaces the rough correlations of today with proper estimates.

Decomposition: Base vs. Channel Contributions. You split every week's modelled sales into base, TV, search and social and show them as a stacked column chart, the chart that marketing leadership actually wants to see.

ROI and Marginal ROI per Channel. You calculate ROAS, ROI, marginal ROAS and marginal ROI for each channel and discover that the channel with the best average return is not necessarily where the next dollar should go.

Budget Reallocation: Same Money, More Sales. You move budget between channels without changing the total, measure the gain in sales and profit, and find the best shift in a scenario grid. This is the lesson that turns analysis into a recommendation.

Multi-Touch Attribution Rules on a Path Table. You switch from weekly totals to customer journeys and credit the revenue of eight conversion paths with first-click, last-click, linear and time-decay rules. You compare the rules and learn where attribution and MMM agree and where they do not.

Summary

Marketing mix modeling explains weekly sales with a base and the spend of each channel. Exploration comes first: total and share of spend with SUM and an absolute reference, correlations with CORREL, an on/off comparison with AVERAGEIF, and a combo chart with a secondary axis. At Larkspur Tea Co. TV took 57% of the budget and correlates strongly with sales, while search and social correlate negatively only because they were raised in TV-dark weeks. The stronger weeks right after each flight hint at carry-over.

Now scroll up to the lab and type the formulas yourself. It takes about fifteen minutes, the Coach checks every step, and by the end you will have the exploration sheet and the combo chart that the rest of the course builds on.

Frequently asked questions

What is marketing mix modeling in simple terms?

Marketing mix modeling explains weekly or monthly sales with a base level plus the effect of each marketing channel. It uses aggregated data, so it needs no cookies or user tracking, and it estimates how much each channel added to sales.

Can you do marketing mix modeling in Excel?

Yes. A basic model with adstock, a saturation curve and a regression fitted with LINEST works in plain Excel for a few channels and a year or two of weekly data. Larger models with many channels and uncertainty estimates are usually done in R or Python.

Why is correlation not enough to measure advertising effect?

Channels are often switched on and off together or deliberately in opposite weeks, so a correlation mixes the media plan with the true effect. Advertising also carries over into later weeks, which a same-week correlation ignores.

How do I calculate correlation in Excel?

Use =CORREL(range1, range2) with two ranges of equal length, for example =CORREL(B5:B20,C5:C20). PEARSON gives the same result, and RSQ returns the squared value.

How do I make a combo chart with a secondary axis in Excel?

Select the data with headers, then choose Insert, Charts, Insert Combo Chart, Clustered Column - Line on Secondary Axis. To fix the series, right-click the chart, choose Change Chart Type and tick Secondary Axis for the line series.

How many weeks of data do I need for marketing mix modeling?

There is no fixed rule. You need enough weeks and enough variation in spend to separate the channels from each other and from the base, so more history and on/off patterns help. Sixteen weeks is enough to learn the method, but a real model usually needs much more.

Keep going: Marketing Mix Modeling & Attribution in Excel

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. Adstock: How Advertising Carries Over
  2. Diminishing Returns: The Saturation Curve
  3. Fitting the Model: Regression with LINEST
  4. Decomposition: Base vs. Channel Contributions
  5. ROI and Marginal ROI per Channel
  6. Budget Reallocation: Same Money, More Sales
  7. Multi-Touch Attribution Rules on a Path Table
  8. Choosing the Decay Rate: A λ Grid Search
  9. S-Shaped Response: The Hill Curve
  10. Control Variables: Seasonality and Promotions
  11. How Sure Are We? Standard Errors and Ranges
  12. When Channels Move Together: Multicollinearity
  13. Testing the Model on Weeks It Has Not Seen
  14. Calibrating the Model with a Geo Holdout Test
  15. Flighting vs. Always-On: Same Budget, Different Sales
  16. The Optimal Split: Equalising Marginal Returns
  17. Due-To Analysis: Why Sales Changed Year on Year
  18. Reconciling Attribution with the Model
  19. Capstone Project: MMM Readout Dashboard

Buy course — $9.90 See the full course