How to Calculate Gross Margin by Product Line

~1 min read

Calculating Gross Margin by Product Line

Multi-product companies need to understand how each product line contributes to overall profitability. Segment gross margin analysis lets you see which products are profitable engines versus margin drags.

The Formula

For each product line:

  • Gross Profit = Revenue − COGS
  • Gross Margin % = Gross Profit ÷ Revenue × 100
  • Revenue Share = Segment Revenue ÷ Total Revenue × 100
  • Blended Margin = Total Gross Profit ÷ Total Revenue × 100

COGS includes direct materials, direct labor, and overhead attributable to that product line.

Step-by-Step Calculation

  1. Gather revenue and COGS for each product line from your P&L or ERP
  2. Calculate gross profit per segment (revenue minus COGS)
  3. Divide gross profit by revenue for each segment to get margin %
  4. Sum all gross profits and divide by total revenue for blended margin
  5. Calculate revenue share for each segment

Example: SaaS + Services Company

Segment Revenue COGS Gross Profit Gross Margin Rev Share
SaaS $800k $120k $680k 85% 80%
Services $200k $120k $80k 40% 20%
Total $1M $240k $760k 76% 100%

Improving Your Product Mix

Once you can see margin by segment, you can make strategic decisions: - Invest in marketing for high-margin segments - Raise prices or cut costs in low-margin segments - Evaluate whether low-margin segments serve a strategic purpose - Model how revenue mix shifts affect future blended margin

Use the Segment Gross Margin Calculator to model your product lines interactively.

Calculate it yourself — free

Use our free Segment Gross Margin Calculator to run the numbers for your own business.

Open Segment Margin →