Daily-Deal Voucher: Restaurant Profit & Break-Even Analysis
Arrays & HashingAuto-graded · 13 test casesLast updated
Tests whether you can build a contribution-margin model for a voucher partnership, solve break-even and sensitivity equations, and decompose a profit change into its drivers.
Daily-Deal Voucher: Restaurant Profit & Break-Even Analysis
You own a small restaurant. Your baseline operating setup looks like this:
- Tables served per day: 20 (one party per table)
- Average pre-discount spend per table: $30
- Variable cost (VC): 40% of pre-discount spend
- Fixed cost (FC): $100/day
- Ignore tips and taxes
A third-party deal platform offers to feature your restaurant with the following promotion: a customer purchases a voucher worth $30 of food for $15. The platform keeps a 40% commission on the $15 the customer pays. Only one voucher may be used per table. Let n denote the total pre-discount spend at a table where a voucher is redeemed.
The cost model for a voucher table is:
Revenue: n
Costs: 0.4n + $15 (the face value the customer redeems) + 0.4 × $15 (the platform's commission)
Work through the six parts below. Show your formulas and report a single final number for each.
Part 1 — Baseline daily profit
What is your restaurant's daily profit before joining the deal platform?
Part 2 — Break-even spend on a voucher table
Using the cost model above, solve for the pre-discount spend n at which a single voucher table contributes exactly zero profit (contribution break-even, not full-cost break-even).
Part 3 — All tables on vouchers
Suppose all 20 tables redeem a voucher and the table count stays at 20 per day. What average pre-discount spend per table is required to keep daily profit equal to the baseline from Part 1?
Part 4 — Mixed observation day
After joining the platform you record the following:
- 25 tables served that day
- 10 of those tables used a voucher
- Average pre-discount spend across all 25 tables: $36
- VC and FC are unchanged
What is the daily profit for this mixed day?
Part 5 — Profit change decomposition
Decompose the change in daily profit relative to baseline into three labeled components:
- Change in table count
- Change in average spend per table
- Voucher cost on the coupon tables (face value + commission)
Report each component's dollar value, the net profit change, its direction, and identify the primary driver.
Part 6 — Sensitivity: minimum coupon-table spend
Holding the 15 regular tables at $36 average spend and all counts unchanged from Part 4, find the minimum average pre-discount spend per coupon table that would restore daily profit to the baseline level from Part 1.
Constraints
- All monetary values are in USD; return exact values (integers or floats).
- Variable cost is always 40% of pre-discount spend, regardless of voucher use.
- The platform's commission is always 40% of the $15 the customer pays (not the $30 face value).
- Fixed cost does not change across any scenario.
- The decomposition uses the sequential order: volume effect at the old spend first, then the spend effect at the new volume.
primary_driveris the string"voucher cost".- Return a single
dictmatching the structure shown in the examples.
Examples
Example 1
Input: daily_deal_voucher_economics()
Output: {'baseline_profit': 260, 'voucher_break_even_spend': 35, 'all_voucher_spend_for_baseline': 65, 'mixed_profit': 230, 'profit_change_vs_baseline': -30, 'decomposition': {'table_count_change': 90, 'average_spend_change': 90, 'voucher_cost': -210, 'primary_driver': 'voucher cost'}, 'minimum_coupon_table_spend_for_baseline': 41}
Hints
Hint 1
The voucher removes $30 from what the customer pays at the table but your kitchen still consumed $n of food, so variable cost is always 0.4 × n regardless of the voucher.
Hint 2
Each voucher table costs you exactly $21 beyond normal variable costs: $15 face value not collected plus $6 commission (40% of $15). Subtract this flat $21 from the 60% contribution margin to get the voucher-table contribution formula: 0.6n − 21.
Hint 3
For the decomposition, compute the volume effect first (extra tables × old spend × margin rate), then the spend effect (new table count × spend increase × margin rate), and finally subtract total voucher cost. Verify that these three components sum to the observed profit change.
Worked solution
Easy Try it yourself first — then compare your approach, complexity and edge cases.
Approach
One identity drives every part of this problem:
Profit = 0.6 × (total pre-discount spend) − $21 × (voucher tables) − $100
The 0.6 comes from the 40% variable cost being tied to food consumed, not to cash collected, so the contribution margin on every dollar of pre-discount spend is always 60%. The $21 per voucher table is the fixed cash hit from each deal: the restaurant receives $15 × (1 − 0.4) = $9 from the platform instead of the $30 face value, a shortfall of $21 (= $15 face value + $6 commission). Fixed cost is a flat $100 subtracted at the end.
Part 1 — Baseline
20 × $30 × 0.6 − $100 = $360 − $100 = $260
Part 2 — Break-even
Set the single-table contribution to zero and solve:
0.6n − 21 = 0 → n = 21 / 0.6 = $35
Part 3 — All-voucher scenario
Set 20-table profit to $260 and solve for n:
20 × (0.6n − 21) − 100 = 260
12n = 780 → n = $65
Part 4 — Mixed day
25 × $36 × 0.6 − 100 − 10 × 21 = 540 − 100 − 210 = $230
Part 5 — Decomposition
Apply volume effect at the old spend, then spend effect at the new volume:
| Component | Formula | Value |
|---|---|---|
| Table count change | (25 − 20) × $30 × 0.6 | +$90 |
| Avg spend change | 25 × ($36 − $30) × 0.6 | +$90 |
| Voucher cost | −10 × $21 | −$210 |
| Net | −$30 |
Check: 260 + 90 + 90 − 210 = 230. ✓
The primary driver is voucher cost (−$210), which more than cancels the combined +$180 gain from more tables and higher spend.
Part 6 — Sensitivity
Hold 15 regular tables at $36, let coupon-table avg spend = m:
15 × 36 × 0.6 + 10 × (0.6m − 21) − 100 = 260
324 + 6m − 210 − 100 = 260
6m = 246 → m = $41
Why this is correct
Every part reduces to the same contribution formula. Because variable cost tracks food consumed rather than cash received, the voucher appears only as a clean $21 deduction per table — it never touches the 60% margin. The cash-flow cross-check for Part 4 confirms this: 15 regular tables bring $540, 10 voucher tables bring $60 from customers plus $90 from the platform, total $690 cash in; subtract $360 VC and $100 FC to get $230. ✓
Common mistakes
- Applying the commission to the $30 face value instead of the $15 the customer pays (gives $12 instead of $6, raising break-even to $45).
- Computing VC on discounted (cash) revenue instead of pre-discount spend.
- Forgetting fixed cost when targeting absolute profit levels in Parts 3 and 6 (it cancels in delta calculations but matters for absolute levels).
- A decomposition whose components do not sum to the total change — always reconcile.
Complexity
This is a closed-form arithmetic problem with O(1) time and O(1) space. No iteration is needed; each answer is a single algebraic expression evaluated once.
from typing import Dict
def daily_deal_voucher_economics() -> Dict:
# ── fixed parameters ──────────────────────────────────────────────
baseline_tables = 20
baseline_spend = 30.0
variable_rate = 0.4
fixed_cost = 100.0
voucher_face_value = 15.0 # amount the customer paid for the voucher
commission_rate = 0.4 # platform's cut of the $15
# ── derived constants ─────────────────────────────────────────────
margin_rate = 1 - variable_rate # 0.6
commission = voucher_face_value * commission_rate # $6
voucher_hit = voucher_face_value + commission # $21 per voucher table
# Part 1 — baseline daily profit
baseline_profit = (baseline_tables * baseline_spend * margin_rate) - fixed_cost
# Part 2 — contribution break-even spend on a single voucher table
# 0.6n - 21 = 0 => n = 21 / 0.6
voucher_break_even_spend = voucher_hit / margin_rate
# Part 3 — required avg spend if all 20 tables use vouchers
# 20 * (0.6n - 21) - 100 = 260 => n = (260 + 100 + 420) / 12
all_voucher_spend_for_baseline = (
(baseline_profit + fixed_cost + baseline_tables * voucher_hit)
/ (baseline_tables * margin_rate)
)
# Part 4 — mixed observation day
mixed_tables = 25
coupon_tables = 10
average_spend = 36.0
mixed_profit = (
mixed_tables * average_spend * margin_rate
- fixed_cost
- coupon_tables * voucher_hit
)
# Part 5 — decomposition (sequential: volume at old spend, then spend at new volume)
count_change = (mixed_tables - baseline_tables) * baseline_spend * margin_rate
spend_change = mixed_tables * (average_spend - baseline_spend) * margin_rate
voucher_cost = -(coupon_tables * voucher_hit)
# Part 6 — min avg spend per coupon table to restore baseline profit
# 15*36*0.6 + 10*(0.6m - 21) - 100 = 260 => 6m = 246 => m = 41
regular_tables = mixed_tables - coupon_tables # 15
sensitivity_spend = (
baseline_profit
+ fixed_cost
- regular_tables * average_spend * margin_rate
+ coupon_tables * voucher_hit
) / (coupon_tables * margin_rate)
return {
"baseline_profit": baseline_profit,
"voucher_break_even_spend": voucher_break_even_spend,
"all_voucher_spend_for_baseline": all_voucher_spend_for_baseline,
"mixed_profit": mixed_profit,
"profit_change_vs_baseline": mixed_profit - baseline_profit,
"decomposition": {
"table_count_change": count_change,
"average_spend_change": spend_change,
"voucher_cost": voucher_cost,
"primary_driver": "voucher cost",
},
"minimum_coupon_table_spend_for_baseline": sensitivity_spend,
}