FP&A Track 5: Unit economics: contribution margin by customer, segment and branch

Published by

on

The Pragmatic CFO: practical finance for the AI era

TL;DR Gross margin tells you what a customer pays for the product. Contribution after cost to serve tells you what the customer is worth once you count the orders you pick, the stops you drive, the rebates you pay and the cash you wait for. Here the AI works it out for every Larkspur Supply Co. customer, and three with normal gross margins turn out to lose money.

What you’ll practice

  • Turning written cost-to-serve rates into a contribution figure for every customer row, with a PROOF line that ties revenue back to the P&L.
  • Ranking customers and rolling the result up by segment and branch, so the weak spots show up where the decisions get made.
  • Converting the ranking into actions (minimum orders, delivery days, rebate terms, pricing) without pretending the costs disappear if a customer leaves.

Time: about 40 minutes. You need the free FP&A Track workbook (Excel) and any AI assistant that can read an uploaded spreadsheet. Larkspur Supply Co. is a made-up company, and so are its customers and numbers, so the file is safe to upload. If the prompt format below is new to you, the JOB / DATA / RULES / OUTPUT / PROOF structure is explained in the Workbench setup lesson.

Why gross margin is not the answer

Most customer reviews stop at gross margin, because that is what the ERP reports. For a distributor that is half the story: two customers at 29% are very different if one places 140 large orders a year and the other 1,000 small ones, each with its own truck stop.

Cost to serve closes the gap. You take the costs that move with how a customer buys (order handling, delivery stops, rebates, returns, the cost of carrying their receivable) and charge each customer for what it uses. The result is contribution after cost to serve. In our view it is the number to rank customers by, and our contribution margin analysis guide covers the general method.

The arithmetic is simple, but it is five calculations on every row, applied the same way every time. That is what AI does well with written rules. Deciding what the result means for a customer relationship is not.

Part A: Contribution after cost to serve for every row

Sheet 5_Customers has Larkspur’s 23 largest customers plus one “all other accounts” row per branch, 27 rows in all, for January to October 2026: revenue, gross margin %, orders, delivery stops, rebate %, days to pay and returns %. Sheet 5b_Cost_To_Serve has the rates: $38 per order for handling, $62 per delivery stop, rebates as stated, 15% of returned revenue, and 9% a year to carry receivables. The receivables formula is the one people get wrong, so the prompt spells it out.

JOB: You are an FP&A analyst building customer contribution after cost to serve for Larkspur Supply Co., January to October 2026.
DATA: Sheet 5_Customers (27 rows: 23 named customers and 4 "All other" rows, one per branch) and sheet 5b_Cost_To_Serve (rates).
RULES: For every row compute: gross profit = revenue x gross margin %; rebates = revenue x rebate %; handling = orders x 38.00; delivery = delivery stops x 62.00; returns cost = revenue x returns % x 15%; AR carrying cost = (revenue / 304) x average days to pay x 9% x 10/12. Contribution = gross profit minus rebates, handling, delivery, returns cost and AR carrying cost. Contribution margin = contribution / revenue. Use the rates exactly as given. Do not add any cost that is not in 5b, do not allocate rent or overhead, and do not round until the final table.
OUTPUT: One table, one row per customer: ID, name, branch, segment, revenue, gross profit, gross margin %, each of the five cost-to-serve lines, contribution, contribution margin %, average order value (revenue / orders). Whole dollars.
PROOF: State the row count (27). Total revenue by branch and in total, and compare each branch to the Jan to Oct revenue in 2_Monthly_PnL. Total gross profit and compare to revenue minus cost of goods sold in 2_Monthly_PnL. Show the full calculation for C-1405 line by line.

If the line-by-line math for Magnolia Janitorial Co-op doesn’t match the AI’s own table, don’t trust the rest of the table.

Part B: Rank it, then roll it up

Roll-ups by segment and branch show whether the problem is a few accounts or a way of doing business.

JOB: You are an FP&A analyst preparing a customer profitability page for the CFO and the branch managers.
DATA: Your Part A table.
RULES: Rank the 23 named customers by contribution margin %, lowest first, and separately by contribution dollars, highest first. Keep the four "All other" rows out of the rankings but in the roll-ups. Roll up revenue, gross profit, total cost to serve and contribution by segment and by branch. For each customer with a negative or near-zero contribution (under 5%), say which cost-to-serve lines are largest relative to its gross profit, using numbers only. Do not label any customer "unprofitable to keep" or recommend dropping anyone.
OUTPUT: (1) Lowest five by contribution margin %. (2) Top five by revenue next to top five by contribution dollars. (3) Segment table. (4) Branch table. (5) For each weak customer: gross profit per order, handling plus delivery per order, rebate dollars, days to pay.
PROOF: Show that the branch contributions add to the total contribution in your Part A table, and that the segment totals add to the same number.

Part C: From ranking to actions

Get the economics straight first. Cost to serve adds no new cost. It assigns costs already in the P&L, mostly branch payroll and the trucks inside other operating costs, to the customers who use them. Larkspur’s handling and delivery charges come to 4,484,874 for the ten months, against 6,721,700 of branch payroll and 2,102,700 of other operating costs in 2_Monthly_PnL.

So “fire the customer” does not save the full amount. Stop serving the weakest account and its gross profit goes right away; the handling and delivery cost stays until someone cuts the hours and the route stops. The useful levers change how a customer buys: minimum order sizes, set delivery days, rebate terms and price. Our price increase analysis guide covers the pricing side, and the overhead allocation methods guide covers why activity rates beat a flat percent of revenue.

JOB: You are an FP&A analyst sizing commercial levers for the weakest customers, for a discussion with sales and the branch managers.
DATA: Your Part A and Part B tables for C-1405, C-1301, C-1204 and C-1104.
RULES: For each customer, show the contribution today and the contribution if (a) the rebate went to zero, (b) delivery stops were cut in half by delivering on set days, holding orders and revenue constant, and (c) both. Also compute the order size at which gross profit per order covers 38.00 of handling plus 62.00 of delivery, at that customer's gross margin and one stop per order. These are what-ifs, not forecasts: state every assumption, and do not estimate savings from dropping a customer.
OUTPUT: One table per lever, then a short list of questions for each branch manager.
PROOF: Recompute contribution for C-1405 under lever (c) line by line.

What a good answer looks like

Show the answer key

Proof checks. 27 rows. Revenue 50,856,040, and by branch North 14,129,100, South 11,630,200, East 12,949,140, West 12,147,600, each tying exactly to Jan to Oct revenue in 2_Monthly_PnL. Gross profit 15,184,678, against 15,184,694 in the P&L: the 16 difference comes from the “All other” margins being rounded to four decimals, and a good answer says so rather than forcing it. Total cost to serve 5,366,002, total contribution 9,818,676.

The three that lose money, and one near zero

CustomerRevenueGM %Avg orderHandling + deliveryRebatesContribution
C-1405 Magnolia Janitorial Co-op (South)314,00029.4%290108,3007,850-28,956 (-9.2%)
C-1301 Delmont Auto Parts Group (East)880,50028.8%395222,90026,415-13,276 (-1.5%)
C-1204 Westline HVAC (West)352,30029.6%36097,9005,284-4,896 (-1.4%)
C-1104 Pellston Facilities Group (North)536,90029.2%410131,00010,7385,725 (1.1%)

Fifth lowest is C-1305 Fairhaven Hospitality at 11.0%. All four have normal gross margins; what they share is small orders, one stop per order, and rebates. At Magnolia, gross profit per order is about 85 against 100 of handling and delivery, so every order loses money before the rebate. Delmont and Westline also pay slowly (68 and 58 days).

Biggest is not weakest. Top five by revenue: Cascade Ridge Builders 1,433,400; Brightwater Municipal Utility 1,059,700; Delmont Auto Parts Group 880,500; Southland Grocers Distribution 825,700; Harlan Mechanical 734,700. Top five by contribution: Cascade Ridge Builders 290,777; Brightwater 231,452; Harlan 165,067; Southland 160,297; Northgate Food Processing 147,513. Cascade Ridge Builders (C-1201) is West’s largest account and Larkspur’s most valuable one: 602 orders averaging about 2,381, a 20.3% contribution margin even with a 2% rebate. Delmont is third by revenue and loses money. The two lowest gross margins (Maple Run School District 24.7%, Eastbay Port Authority 25.1%) both clear 20% contribution, because their orders are large.

By segment

SegmentRevenueContributionMargin
Public sector2,559,900537,96121.0%
Mixed (all other accounts)38,256,9407,630,30319.9%
Contractor3,586,300676,98918.9%
Manufacturing3,565,900635,08617.8%
Facilities2,887,000338,33811.7%

By branch: North 2,697,474; South 2,181,444; East 2,488,154; West 2,451,604. Branch margins fall in a narrow band from 18.8% (South) to 20.2% (West), so this is an account problem, not a branch problem.

Levers (what-ifs, orders and revenue held)

CustomerTodayNo rebateHalf the stopsBoth
Magnolia-28,956-21,1064,61712,467 (4.0%)
Delmont-13,27613,13955,82382,238 (9.3%)
Westline-4,89638825,45330,738 (8.7%)
Pellston5,72516,46346,33557,073 (10.6%)

At a 29% to 30% gross margin and one stop per order, an order has to be about 340 just to cover 100 of handling and delivery: the case for a minimum order or a small-order fee. Where to set it is a commercial call.

Where AI goes wrong on this task

Our view of the usual failure points:

  • Getting the receivables cost wrong. Without the formula, models use 365 days, apply a full year’s rate to ten months, or skip it. Spell it out and check one row.
  • Ranking by revenue or gross margin. Ask “who are our best customers?” and you get the revenue list back with Delmont near the top. Tell the AI which measure to rank by.
  • Allocating overhead you didn’t ask for. A helpful model will spread rent by revenue and call it “fully loaded,” which hides the activity signal.
  • Treating allocated cost as savings. “Dropping Magnolia improves profit by 28,956” is the classic error.
  • Recommending exits. “Consider exiting these accounts” is not the AI’s call. That belongs to people who know the relationship and what else the customer buys.

What stays with FP&A

FP&A owns the rates ($38 an order and $62 a stop are estimates from payroll, route and truck data, worth a yearly refresh) and the framing: costs already being paid, reallocated, with levers about how customers buy, not whether they stay. The conversations with Magnolia, Delmont, Westline and Pellston belong to the branch managers and sales. Bring them gross profit per order next to cost per order.

Check yourself

Delmont Auto Parts Group has a 28.8% gross margin, near the company average. Why does it lose money?

It places 2,229 orders averaging about 395, each with its own stop, so handling and delivery come to 222,900. Add a 3% rebate (26,415) and 68 days to pay, and gross profit of 253,584 turns into a contribution of -13,276.

What is the AR carrying cost for Magnolia, and how is it built?

314,000 / 304 days x 57 days to pay gives average receivables of about 58,875. At 9% a year for 10/12 of the year, that comes to 4,416.

If Larkspur stopped serving Magnolia, would profit rise by 28,956?

No. It would lose 92,316 of gross profit right away and save the rebate and some returns handling. The 108,300 of handling and delivery is in payroll and truck costs, and it only goes away if those hours and stops are actually cut.

Which customer is both the largest by revenue and the largest by contribution?

Cascade Ridge Builders (C-1201), West: 1,433,400 of revenue and 290,777 of contribution at 20.3%.

Why does a good answer report a 16 dollar gross profit difference instead of making it zero?

The “All other” rows carry margins rounded to four decimals, so customer-level gross profit (15,184,678) misses the P&L (15,184,694) by 16. Explaining a small known difference is better than an AI quietly plugging it.

Your turn: try it on your own numbers

Pull the same seven fields for your top 25 customers plus an “all other” row, and write down your handling and delivery rates before you run Part A. No rates yet? Divide warehouse payroll by orders and truck costs by stops, and label them estimates. Customer data is confidential: check the rules in the Workbench setup lesson, use an approved tool, and replace customer names with IDs if you need to.

Next: FP&A Track 6: Headcount planning with AI

New here? Start here to find the best guide for your job, or use the free finance templates, the CFO metrics library and the CFO moves tracker.