Sales Management

Gross margin for a sales owner: the formula, what counts as COGS, and how to tie it to CRM revenue

SalesBond Editorial TeamEditor-in-chief: Oliver Grand9 min read
Bar of $500,000 revenue split into cost of goods sold and gross profit, with a callout showing a 40% gross margin
Contents
  1. Gross margin in one formula (gross profit vs gross margin vs net margin)
  2. What counts as cost of goods sold in a small service or software company
  3. Company-level margin vs deal-level margin
  4. Tie closed-won revenue from the CRM to the margin on your P&L
  5. Same revenue, smaller gross profit: a worked example
  6. What a falling gross margin points to, and who to ask
  7. What the CRM cannot tell you
  8. FAQ

Gross margin (also called gross profit margin) is the share of revenue left after the direct cost of delivering what you sold: revenue minus cost of goods sold, divided by revenue. A company that books $100,000 of revenue in a month and spends $60,000 delivering it has a 40% gross margin. Your CRM gives you the first number for every closed-won deal. It almost never gives you the second, which is why most owners know their revenue to the dollar and their margin to the nearest guess. This article is about the company-level number, and how to connect the closed-won total in Pipedrive or HubSpot to the margin line on your P&L.

Gross margin in one formula (gross profit vs gross margin vs net margin)

Gross margin = (Revenue − COGS) ÷ Revenue × 100. Gross profit is the same subtraction left in dollars; gross margin is that result as a percentage (Mercury: gross margin vs revenue; Wikipedia: gross margin). Salesforce’s example: $500,000 of revenue against $300,000 of COGS leaves $200,000 of gross profit, a 40% gross margin (Salesforce: gross profit margin).

Why track both? Gross profit pays the bills. Gross margin compares months and product lines of different size, so a quarter with more revenue and a lower margin only shows up if you look at both.

Once operating costs come off gross profit, the operating margin formula gives you the next view of the same month.

Net margin sits further down the P&L. It starts from gross profit and subtracts operating expenses, which Salesforce lists as marketing, sales teams, office rent and administration. Gross margin speaks to pricing and how efficiently you deliver; net margin says whether the company made money (Salesforce). A sales owner mostly moves the first one, and gross profit vs net profit puts the two profit lines side by side with where each one lives in a CRM.

Margin is also not markup: markup is measured against cost, margin against price, so the same sale shows two different percentages (Wikipedia). What that does to a discount request is covered in markup vs margin for sales managers.

What counts as cost of goods sold in a small service or software company

In a shop its obvious: the thing you bought and resold. In a twelve-person agency or a software company the honest answer is a decision you make. You decide what counts, write it down, and never change it quietly.

If you hold stock, the inventory turnover ratio shows how fast that COGS leaves the shelf.

Our test has two questions. Would this cost disappear if the customer disappeared? Is it spent on delivering what they bought? Two yeses make it COGS. For a services company that means the hours of the people who deliver the project, contractors on that project, licences bought for that client and travel billed to the job. For a software company, hosting, third-party APIs that meter by usage and the support team that answers customer tickets.

What we keep out: the sales team’s salaries and commissions, marketing, the founders’ time, the office, tools the whole company uses.

Commission is the one people argue about. Our position, and it is only a position with no accounting rule behind it: keep it out of COGS. If it sits there, the sales team lowers gross margin every time it wins and the number stops telling you anything about pricing or delivery. Mercury draws the line in the same place: commissions and payment processing fees go into contribution margin, while gross margin subtracts only the direct cost of goods (Mercury). Some finance teams still book commission against cost of revenue, and if your accountant does, that is a legitimate choice. Just apply it the same way every month, so a change in margin always reflects a change in the business.

Company-level margin vs deal-level margin

Company-level gross margin uses booked costs from the P&L. Deal-level margin uses a cost estimate somebody typed into the CRM before the contract was signed.

The deal-level number exists to catch a discount before it gets approved. In Pipedrive a formula field can compute it on the deal card, and we walked through that setup in formula fields for deal margin in Pipedrive. In HubSpot the equivalent is a custom property with the field type Calculation, available on Professional and Enterprise subscriptions (HubSpot: create calculation and rollup properties).

At the company level the cost is what you actually spent, taken from the books after the month closes. Nobody estimated it, so it’s more honest, and too late to change anything about the deals behind it. An owner needs both numbers, because the deal-level estimate arrives in time to change a quote and the booked figure shows what the deals really cost.

The gap between them is useful in itself. If reps estimate 45% on their deals and the P&L shows 38%, somebody is underestimating delivery cost at quote time. That’s a pricing conversation.

Tie closed-won revenue from the CRM to the margin on your P&L

We run this once a month. It takes about an hour once the fields exist.

Start in the CRM. Pull the month’s closed-won deals with the won date, the amount and a product-line or service-type field. If your deal amounts are list price rather than what was invoiced, fix that before anything else; gross sales vs net sales explains which number the deal amount usually is.

To book each product line to its own revenue account, see the chart of accounts guide.

Then reconcile that total against the revenue line in the P&L for the same month. They won’t match exactly: invoicing dates, subscriptions recognised over time and credit notes all move revenue around. Write the difference down with a reason. If you can’t explain it, stop here, because every margin you compute on top of it will be wrong.

Next, take COGS from the P&L and split it by the same product lines, using the definition you fixed earlier. Finance can tag cost lines by project or product if you ask before the close rather then after.

Finally compute gross margin per line and for the whole month, and put three numbers side by side for each line: CRM revenue, booked revenue, gross margin.

Three-step flow: CRM closed-won deals by product line, P&L revenue and COGS by line, then gross margin by line each month

The CRM knows what was sold and to whom, the P&L knows what it cost, and neither system sees the other, so the owner makes this join by hand.

Same revenue, smaller gross profit: a worked example

Illustrative numbers. A small firm sells an implementation service, an annual software subscription and a support retainer. The month’s closed-won total in the CRM is $180,000 and happens to reconcile cleanly to the P&L.

Implementation brings $90,000 of revenue against $63,000 of COGS, a 30% margin. The subscription brings $60,000 against $12,000, so 80%. The support retainer brings $30,000 against $18,000, which is 40%. Together that is $93,000 of COGS, $87,000 of gross profit and a 48% gross margin.

Next month the total is the same $180,000. Implementation grows to $120,000, the subscription falls to $30,000, and each line keeps its own margin. COGS becomes $84,000 + $6,000 + $18,000 = $108,000. Gross profit is $72,000, and gross margin drops to 40%.

Revenue didn’t move. Gross profit fell by $15,000.

A revenue dashboard shows two identical months. This tends to happen when reps are paid on bookings and implementation is the easier close. That’s the mix effect, and it’s why Salesforce lists optimizing product mix among its five ways to raise margin, alongside pricing and discount control (Salesforce). You can’t manage it from a revenue number.

What a falling gross margin points to, and who to ask

A falling margin has a short list of causes, and each one belongs to a different person. Find out which before anyone proposes a fix.

Revenue per sale fell and cost didn’t? That’s price: discounts, quoting below list, a new competitor. Ask the sales manager and pull the discount field for the month’s won deals.

If revenue held and COGS rose, it’s delivery: projects overrunning estimates, or hosting scaling faster than seats. The delivery lead is the person to ask.

Both held per line but the total fell: mix, as in the example above. Ask yourself, because mix is usually a compensation decision and that one is the owner’s.

And if the margin fell the month you changed what counts as COGS, it’s the definition. Ask finance to restate the earlier months so the series stays comparable.

We have watched teams cut prices to “win back volume” when the real problem was a project that ran forty hours over. The CRM settles that argument in minutes if the discount and cost fields are filled in. Without them, everyone argues from memory.

What the CRM cannot tell you

The CRM knows what was sold, when, by whom and for how much. It doesn’t know what delivery cost, so any margin field on a deal is an estimate made before the work started. It doesn’t know revenue recognition, so a month’s closed-won total is not that month’s revenue line. And it doesn’t know your COGS definition, because that lives in a decision you made with your accountant.

So the honest setup for company-level gross margin is a P&L you trust, a written COGS definition and one hour a month joining the two by product line. SalesBond’s free CRM audit, which reads the last 30 days of deals and sends a PDF report with money at risk, a CRM score and what to fix, covers the CRM side of that join. The resulting margin then feeds the next question: how long a new customer takes to pay back what it cost to win. CAC payback for a small sales team picks up from there.

FAQ

What does a 20% gross margin mean?
Twenty cents of every revenue dollar is left after the direct cost of delivering what you sold; eighty cents went to COGS. Salaries outside delivery, rent, marketing and profit all have to come out of those twenty cents.

Is a 30% or 70% gross margin good?
It depends on what you sell. A services firm carries delivery labor in COGS and usually lands lower than a software company, where COGS is mostly hosting and support. Compare with your own trailing months under the same COGS definition, and with an industry benchmark only if it states its year and method.

Should sales commission be in COGS?
We keep it in operating expenses, so winning more deals doesn’t lower gross margin by definition. Some companies include it. Whichever you choose, apply it the same way every month.

Can I get gross margin straight from my CRM?
Only as an estimate. The CRM has closed-won revenue and whatever cost reps typed in; actual COGS and recognized revenue live in the P&L.