Multi-Product Profit Calculator

Enter the selling price, cost and quantity of each product to get the gross profit and gross margin of each row, and the overall gross margin for all products together.

Selling price, cost and quantity of each product (2 to 20 rows; the product name is optional; use the same basis for all amounts, for example before tax; rows with nothing entered are ignored)
Overall gross margin (total gross profit ÷ total revenue) —%
Total revenue—
Total cost—
Total gross profit—
The value copied is the overall gross margin as a number without the % sign (for example, 26.67). Margins are rounded to 2 decimal places.

How it is calculated

For each product (each row):

The overall gross margin is calculated from total revenue and total cost. The total gross profit (total revenue − total cost) is divided by the total revenue. It is not the average of the margins of the rows: products with more revenue have a larger effect on the overall margin.

Amounts are handled as whole cents (or the smallest unit of your currency) and the margin is rounded once, to 2 decimal places, so there is no floating-point error. The currency is not fixed.

Example

Product A (price 10.00, cost 6.00, quantity 10) and product B (price 5.00, cost 4.00, quantity 40):

Product Revenue Cost Gross profit Gross margin
A 100.00 60.00 40.00 40.00%
B 200.00 160.00 40.00 20.00%
Total 300.00 220.00 80.00 26.67%

The average of the two rows' margins (40.00% and 20.00%) is 30.00%, but the overall gross margin is 26.67% (80 ÷ 300). It is closer to the margin of B, which has more revenue.

Notes

Frequently asked questions

Is the overall margin the average of the margins of the products?

No. It is the total gross profit divided by the total revenue, so products with more revenue count for more.

What is the difference between gross margin and cost ratio?

Gross margin is gross profit ÷ revenue; the cost ratio is cost ÷ revenue. They add up to 100% (a 26.67% margin means a 73.33% cost ratio). The Cost Ratio Calculator finds the cost ratio.

What happens with a product that is sold at a loss?

The negative gross profit of that row is included in the total. If the total gross profit is negative, the total is shown as a loss.