All calculators

Guide · Pricing & Margin

Weighted Average Margin: Weight by Revenue

Calculate portfolio gross margin from revenue and cost totals, then see why averaging product margin percentages gives the wrong answer.

By PriceAndProfit Editorial Updated 3 min read

On this page
  1. Worked calculation
  2. Decision checks and limits
  3. Apply the calculation

A combined margin is total profit divided by total revenue. It is not normally the simple average of the percentages printed beside each product. The difference matters whenever products generate different sales dollars. Weighting each margin by its share of revenue reproduces the total calculation; weighting by units works only when selling prices are equal across those units.

Worked calculation

Portfolio margin = sum of product gross profit ÷ sum of product revenue; revenue weight = product revenue ÷ total revenue

Suppose a shop sells 100 small kits for $20 each, with a $12 unit cost, and 20 large kits for $100 each, with a $75 unit cost. Small kits generate $2,000 revenue and $800 gross profit, giving a 40% margin. Large kits also generate $2,000 revenue but only $500 gross profit, giving a 25% margin. Combined revenue is $4,000 and combined gross profit is $1,300, so the portfolio margin is 32.5% of revenue.

The simple average happens to equal 32.5% in that first case because the revenue weights are equal. Change large-kit volume to 40 units and the shortcut fails. Large kits now contribute $4,000 of revenue and $1,000 of gross profit. Together the products generate $6,000 of revenue and $1,800 of gross profit: a 30% margin. Unit weighting would put too much emphasis on the numerous lower-priced kits and would answer a different question.

Hypothetical worked example
Product in revised mixRevenueGross profitRevenue weight
Small kits $2,000 $800 33.3333%
Large kits $4,000 $1,000 66.6667%
Total $6,000 $1,800 100%

Decision checks and limits

This change is a sales-mix effect, not evidence that either product's unit economics deteriorated. Both prices and both costs stayed the same. The lower-margin product simply supplied a larger share of revenue. When reviewing a falling portfolio percentage, separate changes in product margin from changes in revenue mix. A falling overall percentage may coexist with rising gross-profit dollars, as this example demonstrates.

Build the calculation from net sales after the discounts and returns that belong to each product. Use the matching cost basis and period. A returned order can create unusual negative rows, so investigate its treatment rather than assuming every weight is positive. If total net revenue is zero, the combined margin is undefined. If it is positive while total gross profit is negative, retain the negative percentage. Do not clip a real loss into a zero-margin result.

Apply the calculation

  1. Aggregate dollars first

    Multiply units by realized price and unit cost for each product. Sum the resulting revenue and gross-profit dollars.

  2. Reconcile the weighted check

    Multiply each product margin by its unrounded revenue weight. The sum should match total gross profit divided by total revenue.

  3. Explain the movement

    Compare current and earlier product weights. Identify whether price, cost, or the mix of products explains the aggregate change.

Method references: OpenStax: Contribution margin. Accessed October 22, 2026. All dollar figures are hypothetical worked examples.

Related calculators & guides