Gross margin by customer or by product needs revenue and cost of sales at the same grain: to know the margin on what you sold to customer X, you need to know what the things you sold to customer X cost. The profit and loss gives you gross margin for the whole business because both revenue and cost of sales are posted to the ledger, but it can only split margin by customer or product if the cost was posted with that information attached, and in most accounting systems it wasn't. Where the cost is known per line (stock items with a cost price, jobs with booked time and purchases, products with a standard cost), the margin report is a modelling job over data you already have. Where it isn't, the honest report shows margin at the level the data supports and says so, rather than allocating overheads by guesswork and calling it customer profitability.
What does "gross margin" mean on this report?
Revenue less the direct cost of what was sold. Direct cost is the cost of the items shipped, the hours worked at cost rate, the subcontractor invoices for that job, the materials for that job. Not rent, not salaries of people who don't work on jobs, not marketing. Those are overheads, and a report that allocates them by revenue share to produce "net profit by customer" is producing a number that moves when the allocation rule moves. Keep the report at gross margin and put the overheads on the P&L where they belong.
Gross margin % = (revenue minus cost of sales) ÷ revenue. Show both pounds and percent; a customer with a high margin percent on a small revenue is a different decision from a low percent on a large one.
What does each system hold cost of sales at?
This table decides what the report can honestly show.
| System | Where cost of sales comes from | Grain the cost is known at | What you can honestly report |
|---|---|---|---|
| Xero | Cost of sales nominal accounts; inventory items with a cost price (tracked inventory) | Item level if tracked inventory is used; otherwise ledger level only | Margin by product if items are tracked; margin by customer only if bills are coded to tracking categories that map to customers, which is rare |
| QuickBooks Online | COGS accounts; inventory items with cost (Plus and Advanced); Projects with costs | Item level with inventory; project level with Projects | Margin by product with inventory; margin by project/customer with Projects |
| Sage 50 Accounts | Cost of sales nominals; stock items with cost price; project costing on Professional | Item level with stock; project level on Professional | Margin by product with stock; by project on Professional |
| Sage 200 | Stock control with costing methods (FIFO, average, standard); Project Accounting; sales order lines carry cost | Invoice line level for stock items; project level | Margin by customer, product and order line for stock businesses; by project for services |
| Business Central | Item ledger with costing methods; Projects (jobs) with usage; value entries per posting | Invoice line level; job level | Margin by customer, item, salesperson, dimension; the Sales Power BI app includes margin |
| NetSuite | Item costing; project costing with SuiteProjects | Transaction line level | Margin by customer, item, class, location |
Source: each vendor's product documentation, read 21 September 2026; feature availability depends on plan and modules.
The pattern: the ERP-class systems (Sage 200, Business Central, NetSuite) carry cost on the sales line, so margin by customer and product is a model over the transactions. The small-business systems (Xero, QuickBooks, Sage 50) carry it if you use their inventory or project features, and don't if you post cost of sales as lump-sum bills. If you're on Xero with no tracked inventory and want margin by customer, the first job isn't a report, it's changing how costs are recorded.
What should the margin report show?
- Margin by customer, twelve months rolling: revenue, cost, margin £, margin %, sorted by margin £. The top ten and the bottom ten are the decisions.
- Margin by product or service line, same columns.
- Margin trend by month for the business, and for any customer or product you click.
- Mix: the share of revenue coming from high-margin versus low-margin lines, over time. A business whose margin percent is falling because mix is shifting has a different problem from one whose prices are slipping.
- Price versus cost: for a product, the average selling price and the average cost over time on the same chart. This is where "we didn't pass the cost increase on" becomes visible.
- Customers with margin below the threshold and what they buy. The list the sales director takes into the account review.
One page for the leadership view, one for the detail with drill to invoice line. Row-level security if account managers should see only their customers.
How do you build it so the numbers reconcile?
- Model from invoice lines (and credit note lines) with their cost, not from the P&L. For stock businesses, the cost on the line is the costing method's cost at the time of the sale. For services, the cost is the hours × cost rate and the purchases coded to the job.
- Keep credit notes in. A customer who returns a third of what they buy has a different margin from the invoice-only view. Credit notes often carry less reference data than invoices, so check they're joining.
- Reconcile to the ledger every refresh. Total revenue in the model against the sales accounts in the P&L; total cost in the model against the cost of sales accounts. If the model's cost of sales is lower than the ledger's, some cost isn't attached to a line or a job, and the page shows how much. That gap is the honest boundary of the report: margin by customer is exact for the attached cost and the unattached remainder is stated, not allocated.
- Don't allocate overheads on this report. If someone wants net profit by customer, do it on a separate page with the allocation rule printed on it, so the argument is about the rule, not the report.
If the accounts system carries the cost (the ERP row of the table, or Xero/QuickBooks/Sage 50 with inventory or projects in use), this is a single-source build and it's what the First Report is for: one system, one report answering "which customers and products make money?", the headline figure reconciled back to the ledger to the penny, £1,950 fixed, ten working days (see the First Report). Cost in a separate job or timesheet system is a second source and a Reporting Sprint. Power BI Pro is £10.80 per user per month on Microsoft's UK page as of September 2026, for each viewer.
Common questions
What is a gross margin report?
Revenue less direct cost of sales, in pounds and as a percentage, by customer, product, service line or period. It excludes overheads, which stay on the P&L.
Why can't my accounting system show margin by customer?
Because the cost of sales was posted as bills to a nominal account without a link to the customer or the item. Margin by customer needs cost known per invoice line, per item or per job. ERP-class systems (Sage 200, Business Central, NetSuite) hold it that way; Xero, QuickBooks and Sage 50 do only if their inventory or project features are used.
Can Xero do gross margin by product?
If you use tracked inventory with cost prices, yes: each sale carries the item's cost and margin by item follows. Without tracked inventory, Xero holds cost of sales at the ledger level only.
Can QuickBooks Online show gross margin by customer?
By project, yes, on the Plus and Advanced plans with Projects tracking income and costs. By product, yes with inventory items. By customer across everything, only to the extent that costs are attached to projects or items.
What's the difference between gross margin and customer profitability?
Gross margin is revenue less direct cost. Customer profitability usually means net profit after allocating overheads, and the allocation rule changes the answer. Report gross margin as fact; if you must show net, print the allocation rule next to it.
How do I check the margin report matches the accounts?
A reconciliation page: the model's revenue against the sales accounts and the model's cost against the cost of sales accounts, every refresh, difference shown. Any unattached cost is stated as a remainder, not spread across customers.
Should margin include credit notes and discounts?
Yes. Revenue is net of credit notes and discounts, and the cost of returned goods needs handling according to your costing method. A margin report on invoices only overstates every customer who returns things.