Skip to content

AI Costing Prompts · By task

Rank customers by profit and build the whale curve

Paste your net profit by customer into any capable AI model and get a ranked profitability table, a cumulative running total, and a plain-language read of where your business actually makes and loses money. This prompt does the arithmetic and the interpretation. It does not invent a single figure.

In short

Give the model net profit for each customer. It ranks them from most to least profitable, sums the total, builds a cumulative running total in ranked order, and finds the peak of that curve. The peak is almost always higher than your reported total, because the loss-making customers at the tail pull the kept profit back down. The prompt names which customers destroy value and quantifies how much profit you would recover by fixing them.

What the prompt is doing

This is the whale curve, the single most persuasive picture in customer profitability analysis. When you rank customers by net profit and plot the cumulative total, the line climbs steeply at first because a handful of customers carry the business. It then flattens across the marginal accounts that barely cover their cost to serve. Finally it dives, because the customers at the bottom are not low-margin, they are loss-making, and each one subtracts from the total you have already built.

The reason the peak matters is that it is the profit you would keep if you simply stopped losing money on the tail. The gap between the peak and your reported total is not theoretical. It is real profit being consumed by accounts you are actively serving. Reading the whale curve correctly turns a vague sense that "some customers are unprofitable" into a specific number and a specific list.

The prompt

You are a profitability analyst. Work only from the data I give you. Do not invent any numbers, customers, or facts. If something is unclear or missing, flag it as an assumption rather than filling it in.

Here is net profit by customer (EUR):
C1 96,000
C2 71,000
C3 52,000
C4 33,000
C5 18,000
C6 9,000
C7 2,000
C8 -7,000
C9 -21,000
C10 -38,000

Do the following:
1. Rank the customers from most to least profitable.
2. Calculate the total net profit across all customers.
3. Build a cumulative running total in ranked order.
4. Identify the peak of the cumulative curve and state what percentage of total net profit the top customers represent at that peak.
5. Explain in plain language what the whale curve shows here and which customers are destroying value.
6. List any assumptions you had to make.

Output a table with columns: Rank, Customer, Net profit, Cumulative.

A worked example

RankCustomerNet profit (EUR)Cumulative (EUR)
1C196,00096,000
2C271,000167,000
3C352,000219,000
4C433,000252,000
5C518,000270,000
6C69,000279,000
7C72,000281,000
8C8-7,000274,000
9C9-21,000253,000
10C10-38,000215,000

Total net profit = 215,000 EUR. The cumulative curve peaks at 281,000 EUR after C7, the last profitable customer.

The seven profitable customers generate 281,000, which is 131% of total net profit. The top two alone (C1 plus C2) contribute 167,000, or 78% of the total. The bottom three (C8, C9 and C10) destroy 66,000 between them, dragging the kept profit from 281,000 down to 215,000.

In plain language: the curve climbs steeply because a few customers do the heavy lifting, flattens across the marginal accounts that barely contribute, then dives as the value destroyers subtract from the total. Bringing the three loss-makers to break-even would lift net profit from 215,000 to 281,000, a 31% increase with no new customers.

Assumption flagged: net profit is assumed to be fully loaded and comparable across customers. If some accounts carry unallocated cost to serve, the ranking could shift before any action is taken.

What it costs you to run

The sample input above is roughly 250 tokens. With ten customers and a short instruction set, a single run of this prompt is inexpensive on any current model, well under a cent on most. Even scaling the input to a few hundred customers keeps the cost trivial relative to the profit the analysis surfaces.

Token figures are approximate and vary by model and tokeniser.

The guardrail that matters

Work only from the data I give you. Do not invent any numbers, customers, or facts. If something is unclear or missing, flag it as an assumption rather than filling it in.

That single line is what keeps the output trustworthy. Without it, a model asked to "analyse customer profitability" will happily fabricate plausible figures. With it, the model stays inside your data and tells you when it cannot. See how to stop AI inventing numbers for why this matters in costing work.

Go further

Turn the whale curve into a fix, reprice or drop plan

The prompt above draws the curve and names the value destroyers. This next one reads the same ranking and tells you what to do about the tail, account by account, putting repricing and behaviour change ahead of dropping anyone. Run it once you have the ranked table from the prompt above.

Fix, reprice or drop the loss-making tail

You are a profitability analyst. Work only from the data I give you. Do not invent any numbers, customers, or facts; flag every assumption. Your job is not just to describe the curve but to tell me what to do about the tail, with the arithmetic behind each call.

I will paste net profit by customer, and where I have it, the revenue and the main cost-to-serve drivers (order count, delivery count, returns, support hours) for the loss-making accounts.

Step 1. Rank customers by net profit, total them, build the cumulative running total, and mark the peak (the last profitable customer). State the profit given back by the tail as the gap between the peak and the reported total, in money and percent.

Step 2. For every customer below the peak (net profit at or below zero, or thin enough to be marginal), classify it into one of three actions and show the evidence from the numbers:
- FIX: the account can be saved by changing behaviour. Name the driver destroying margin (too many small orders, high returns, one delivery per line, heavy support) and the specific change (minimum order size, delivery consolidation, service-level change, self-service). Estimate the net-margin swing if that driver moved, labelled as an estimate.
- REPRICE: a small price or surcharge move flips loss to profit. Show the before and the after, and the percentage move required.
- DROP: only as a last resort, only after fix and reprice are shown not to work. Note the loss it removes and, if I gave cost-to-serve drivers, the capacity or effort that would free up.

Step 3. Sum the recovered profit if every FIX and REPRICE landed, and compare it to the peak. State how much of the gap between reported total and peak you could realistically close without losing a single customer.

Step 4. End with the five questions I should take to my controller before acting on any of this with real money.

Show your working as tables, keep every estimate labelled as an estimate, and list every assumption at the end so I can correct it and have you rerun.

The output should reach for repricing and behaviour change before it reaches for dropping anyone. A model that jumps straight to "fire the customer" has skipped the cheaper answer, which is usually the right one.

Turn it into a file

Make it a deliverable you can edit and show

The prompts on this page produce a ranked table and a whale curve in the chat. This add-on turns that into a file you can edit and put in front of a board, an adjustable Excel model, a clean PDF, a short deck, or a diagram. Paste it after the whale-curve prompt once the ranking has run.

Now package this customer-profitability analysis into a deliverable I can edit and show colleagues. Ask me which format I want, or default to Excel:

- EXCEL: a working model, not a picture of one. Put the net profit by customer (and any cost-to-serve drivers) on one clearly marked input sheet, and drive the ranking, the cumulative running total and the peak with live formulas that reference those inputs, so when a figure changes the whole curve updates. Add a summary sheet with the ranked table and, if the tool allows, the whale curve chart (cumulative profit plotted against ranked customers). Label every assumption cell.
- PDF: a clean, board-readable report, title, one-paragraph summary (peak profit, reported total, the gap the tail gives back), the ranked table, the whale curve, and an assumptions appendix. No chat formatting.
- PPT: 5 to 7 slides, the question, the method in one slide, the whale curve, the value destroyers named, the fix/reprice/drop plan, next steps.
- DIAGRAM: a single clear figure of the whale curve (customers ranked best to worst, cumulative profit climbing to a peak then diving across the tail), with the peak, the reported total and the recoverable gap marked, as an editable vector or a described layout I can rebuild.

Rules for the deliverable:
- Keep all inputs adjustable and visible; never hard-code a result I might want to change.
- Carry through every assumption and label illustrative figures as illustrative.
- Add a discreet footer or last-slide credit line, small and unobtrusive, exactly as written below.

Credit line to embed (use verbatim, in the document footer or final slide):
"Model scaffolding based on the Customer profitability and whale-curve prompt from costandprofitability.com/ai-costing-prompts/customer-profitability"

Keep it to one small line; it should read as a quiet source note, not an advertisement.

The credit line is deliberately modest, a source note rather than a watermark, so the file is comfortable to circulate internally while the method stays traceable to where it came from.

When you need the real model

This prompt works on net profit you already have. The harder question is whether that net profit is right in the first place, which means tracing cost to serve down to each customer with a defensible method rather than an averaged allocation. That is the work behind a real profitability model.

Related prompts

Proof

A distributor in New Zealand. €1.335M of cost-to-serve made visible, then halved, and 830 loss-making customers brought down to 295.

Read the case study →

Who you would be talking to

Miguel Guimarães, Founding Partner

Cost and profitability practitioner for 25+ years. Presented the Damco cost-to-serve case at Managing for Profit (Amsterdam RAI, December 2009), on the same programme as Robert S. Kaplan.

Call +351 910 313 731

Workshops20-21 Oct · Online, ZoomReserve a seat

FAQ

Frequently Asked Questions

What is a whale curve?
A whale curve ranks customers from most to least profitable and plots the running total of profit. It typically climbs steeply, peaks well above one hundred percent of total profit, then falls as loss-making customers drag it back down. The shape shows how few customers carry the business.
How can a customer with good revenue still lose money?
Revenue says nothing about the cost of serving that customer. Frequent small orders, special delivery, heavy support, high returns, and deep discounts all sit below the gross margin line. Once you attribute them, a large, demanding account can quietly cost more to serve than it brings in.
What data do I need to rank customers by profit?
You need revenue and gross margin per customer, and the main activities that serving each one consumes. Order counts, delivery frequency, and support time are the usual drivers. You can start from monthly exports and refine later. A directional ranking is more useful than a delayed exact one.
What should I do with the loss-making tail?
Do not simply drop those customers. Look at why they cost so much, then adjust order minimums, delivery terms, pricing, or service levels. Many tail accounts become profitable with small changes. The whale curve tells you where to look, and the conversation with the customer decides the outcome.
Miguel Guimarães

Reviewed by

Miguel Guimarães

Founding Partner, Cost and Profitability Consulting

More than 150 Time-Driven ABC engagements across 11 sectors since 2010, working within the Kaplan and Anderson framework.

About the author →
M
Ask us anything
usually replies in minutes
Hi. I can answer the quick questions about cost, method and timing right here. For anything specific to your business, I'll connect you with a CostCtrl specialist on WhatsApp.
Free. No bot loops. Straight to a specialist.
Most read
  1. 1Time-driven activity-based costing: ABC made simple and scalable
  2. 2Cost-to-Serve Analysis
  3. 3The Whale Curve
  4. 4TDABC vs ABC
  5. 5Cost-Volume-Profit (CVP) and Break-Even Analysis
  6. 6Make-or-Buy and Relevant Costs
  7. 7How to calculate cost to serve, step by step
  8. 8Methods & Frameworks: how we cost, defensibly
  9. 9Customer Profitability Analysis
  10. 10TDABC for Financial Services