# Margin Calculator

Canonical: [Margin Calculator](<https://www.cfosilvia.com/financial-calculators/margin>)

Category: [Business and self-employed calculators](<https://www.cfosilvia.com/financial-calculators#business>)

Built by [Silvia](<https://www.cfosilvia.com/about>). Content updated: 2026-10-19.

Calculate gross profit, profit margin, and markup from revenue and cost.

Best for: Calculate gross profit, gross margin, and markup from revenue and cost.

This is an educational estimate based on your inputs. Read the formula and assumptions, and check any stated rule year and primary sources before making a financial decision. Open the canonical interactive page to enter a scenario; this Markdown reference contains no visitor inputs or personalized calculation results.

## Inputs

- **Selling price or revenue** Units: $.
- **Cost** Units: $.

## How to use this calculator

Use this margin calculator to separate gross profit, profit margin, and markup. These measures use the same revenue and cost but different denominators, which is why a target markup does not produce the same percentage margin.

1. **Enter revenue and direct cost.** Use the selling price or total revenue and the cost directly associated with producing or acquiring the item.
2. **Compare margin with markup.** Read profit as a share of revenue and markup as a share of cost; do not use the terms interchangeably.
3. **Test price and cost changes.** Adjust one variable at a time to see how discounts or supplier increases affect gross economics.

## Worked planning example

### Example: 40% margin is not 40% markup

**Set up:** Enter a $100 selling price and $60 direct cost. Gross profit is $40, margin is $40 ÷ $100 = 40%, and markup is $40 ÷ $60 = 66.67%.

**Compare:** Reduce the price to $90 while keeping cost at $60. Profit falls to $30, margin to 33.33%, and markup to 50%.

**Takeaway:** Margin measures profit against the selling price; markup measures it against cost. Use Discount to model the price reduction before comparing both percentages here.

## Use the right cost definition

Gross margin can look strong while overhead, returns, shipping, commissions, and financing still reduce net profit.

- Define direct cost consistently across comparisons.
- Include transaction-level costs when evaluating an offer.
- Model the volume needed to offset a lower margin.

## Calculation methodology and assumptions

Gross profit = revenue − cost. Gross margin = gross profit ÷ revenue × 100; markup = gross profit ÷ cost × 100. Margin measures profit against the selling price, while markup measures it against cost. Use revenue and costs for the same period and scope. Operating expenses, interest, and taxes are excluded unless you deliberately include them in cost. A ratio with a zero denominator is unavailable; gross profit and any independently valid ratio are still shown.

## Frequently asked questions

### What is the difference between margin and markup?

Margin divides profit by revenue, while markup divides profit by cost. The percentages are different even when revenue, cost, and profit are unchanged.

### Does gross margin include operating expenses?

Usually not. This calculator uses entered revenue and cost. Rent, payroll, marketing, taxes, interest, and other overhead must be considered separately unless included in the cost input.

### Can profit margin be negative?

Yes. When cost exceeds revenue, gross profit and margin are negative. Review the cost basis and selling-price assumptions before relying on the result.

## Related calculators

- [Discount Calculator](<https://www.cfosilvia.com/financial-calculators/discount/index.md>): Calculate the dollar discount and final price after one or two percentage discounts.
- [Commission Calculator](<https://www.cfosilvia.com/financial-calculators/commission/index.md>): Calculate commission earnings, gross pay, and the sales required to reach a commission target.
- [VAT Calculator](<https://www.cfosilvia.com/financial-calculators/vat/index.md>): Add value-added tax to a net price and separate VAT from a gross price.
- [Sales Tax Calculator](<https://www.cfosilvia.com/financial-calculators/sales-tax/index.md>): Calculate sales tax and the final after-tax price, or reverse tax from a tax-inclusive total.

Related guide: [Business ownership in your financial picture](<https://www.cfosilvia.com/finance/how-to-track-private-company-equity>)

All calculators: [Financial calculator directory](<https://www.cfosilvia.com/financial-calculators/index.md>)

## Put the estimate in context with Silvia

Connect your bank accounts and all the assets that shape your real financial picture, then ask Silvia to help you think through the trade-offs and keep you informed 24/7.

[Try Silvia for free](<https://www.cfosilvia.com/sign-up>)
