Transparent calculators with visible methods, assumptions, and limits.
Margin Calculator: Gross Margin, Markup, and Net Profit from Cost and Selling Price
Use this calculator to determine gross margin percentage, markup percentage, and net profit when you know the cost price and selling price. The tool shows the breakdown of cost, revenue, and profit, and visualizes the relationship between these values.
Enter values and click “Calculate Margin” to see results.
The gross margin percentage shows what portion of revenue remains after accounting for the cost of goods sold (COGS). A higher margin indicates better profitability per unit. If your margin is low, consider increasing the selling price or reducing costs. For net profit, ensure all additional expenses are included.
How margin, markup, and profit relate to cost and selling price
Gross margin is the difference between revenue and COGS, expressed as a percentage of revenue. Markup is the difference between selling price and cost, expressed as a percentage of cost. Net profit accounts for all additional costs beyond COGS.
Worked examples
Scenario: You buy a product for $50, sell it for $80, and incur $5 in shipping fees per unit.
Result: Calculating…
Scenario: You purchase 10 units at $200 each, sell them for $250 each, and pay $10 in fees per unit.
Result: Calculating…
Scenario: You sell an item for the same price you paid ($10).
Result: Calculating…
Common pitfalls when calculating margin
Mixing up margin and markup: Margin is based on revenue, while markup is based on cost. Using the wrong basis can lead to incorrect pricing decisions.
Ignoring additional costs: Forgetting to include shipping, fees, or other expenses can overstate profitability.
Assuming margin equals profit: Gross margin excludes operating expenses, taxes, and other overheads. Net profit is the true measure of earnings.
Unusual boundary cases
Selling at cost: If selling price equals cost, gross margin is 0%, and markup is 0%. This is break-even.
Negative margin: If selling price is less than cost, gross margin is negative, indicating a loss on each sale.
Zero cost: If cost is zero (e.g., free samples), gross margin is 100%, but this is rare in real-world scenarios.
Assumptions: This calculator assumes:
- Cost and selling price are per unit unless quantity is specified.
- Additional costs are fixed per unit and do not scale with volume.
- Taxes, discounts, or bulk pricing are not included.
- Results are estimates and should be verified with actual financial records.
Exclusions: Does not account for taxes, discounts, bulk pricing, or variable overhead costs.
When not to use: For complex pricing models (e.g., tiered pricing, volume discounts) or regulated industries with specific accounting rules.
Comparison: Margin vs. Markup vs. Net Profit
| Metric | Formula | Purpose |
|---|---|---|
| Gross Margin % | (Revenue – COGS) / Revenue × 100 | Measures profitability relative to revenue. |
| Markup % | (Selling Price – Cost) / Cost × 100 | Measures pricing relative to cost. |
| Net Profit | Revenue – COGS – Additional Costs | Actual earnings after all costs. |
Frequently asked questions
Why is my gross margin lower than my markup?
Gross margin is calculated as a percentage of revenue, while markup is a percentage of cost. Since revenue is always higher than cost (for profitable sales), the same absolute difference will yield a lower percentage when divided by the larger revenue figure.
Can gross margin be over 100%?
No. Gross margin cannot exceed 100% because it represents the portion of revenue remaining after COGS. The maximum is 100% (if COGS is zero), but this is unrealistic in most business contexts.
How do I improve my gross margin?
Increase the selling price, reduce the cost of goods sold, or lower additional expenses. Focus on high-margin products or negotiate better terms with suppliers.
Does this calculator account for taxes?
No. Taxes are not included in this calculation. For accurate profitability, consult a tax professional or use accounting software that incorporates tax rules.
Sources and verification:
Calculation and sources checked 2026.