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.
How it is calculated
For each product (each row):
- Revenue = selling price × quantity
- Cost = cost per unit × quantity
- Gross profit = revenue − cost
- Gross margin (%) = gross profit ÷ revenue × 100
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
- Prices and costs can have up to 2 decimal places, and each can be up to 9,999,999,999.99. The quantity is a whole number from 0 to 999,999,999 (fractional quantities are not covered).
- Enter prices and costs on the same basis (all before tax or all including tax); otherwise the margin is off.
- A row with a negative gross profit is a loss and is shown with a minus sign. A gross profit of exactly 0 is not a loss.
- If a row's revenue is 0, its margin cannot be calculated (it is marked "Not available"). If the total revenue is 0, the overall margin cannot be calculated either.
- "Gross margin" here is gross profit ÷ revenue. Markup (gross profit ÷ cost) is a different number; the Profit Margin Calculator shows both for a single product.
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.