Gross Margin Calculator: Calculate Gross Profit and Profit Margin

Compare revenue and direct costs to calculate gross profit, margin, and markup. Switch to selling-price mode to estimate the price needed for a target gross margin using US dollar amounts.

Enter your details

For Calculate Margin: use revenue and COGS from the same period. These totals are not used in selling-price mode.

Required for selling-price mode. For margin mode, enter both unit cost and selling price to see an optional per-item comparison.

Optional in margin mode; not used to determine the target selling price.

Used in Calculate Selling Price mode. A 100% target has no finite price for a positive unit cost.

Your Gross Margin Results

Gross margin40.00%
Revenue less direct costs
Revenue
$120,000.00
Cost of goods sold
$72,000.00
Gross profit
$48,000.00
Markup on COGS
66.67%

Margin divides gross profit by revenue or selling price. Markup divides gross profit by cost. For a $100 sale and $60 cost, margin is 40% and markup is 66.67%. Gross profit excludes operating expenses, financing costs, and taxes.

A negative margin means direct costs exceed revenue. Use consistently classified revenue and COGS for the same accounting period.

What Is a Gross Margin Calculator?

A Gross Margin Calculator helps businesses determine what percentage of revenue remains after subtracting the direct costs of producing or purchasing goods and services.

Gross margin is one of the simplest ways to assess how efficiently a business generates revenue relative to its direct costs.

For example, an online retailer might sell a product for $100 after purchasing it for $60.

The business earns $40 in gross profit before accounting for other operating expenses.

Our calculator helps you calculate gross profit, gross margin, and related pricing figures.

Whether you operate an e-commerce store, a service business, or a traditional retail company, understanding gross margin can support better pricing and cost decisions.

How to Use Our Gross Margin Calculator

Enter the following figures:

  1. Revenue: Total sales revenue for the period being evaluated.
  2. Cost of goods sold (COGS): Direct costs associated with the products or services sold.
  3. Optional selling price: The price charged for one unit.
  4. Optional unit cost: The direct cost of producing or purchasing one unit.

The calculator will estimate your gross profit and gross margin percentage.

If unit values are provided, it can also calculate the gross profit per item.

For best results, use revenue and COGS figures covering the same accounting period.

Gross Margin Calculator Formula

The standard gross margin formula is:

Gross Margin (%) = ((Revenue − COGS) ÷ Revenue) × 100

Gross profit is calculated as:

Gross Profit = Revenue − Cost of Goods Sold

Where:

  • Revenue: Sales generated from the business.
  • COGS: Direct expenses attributable to those sales.
  • Gross Profit: Revenue remaining after COGS.
  • Gross Margin: Gross profit expressed as a percentage of revenue.

Gross margin differs from net profit margin because it does not subtract all operating expenses, financing costs, and taxes.

Gross Margin Calculation Example

Suppose your business generates $120,000 in annual revenue.

The direct costs of producing and delivering the goods sold total $72,000.

Your gross profit is:

$120,000 − $72,000 = $48,000

Now calculate gross margin:

($48,000 ÷ $120,000) × 100 = 40%

Business figureAmount
Sales revenue$120,000
Cost of goods sold$72,000
Gross profit$48,000
Gross margin40%

A 40% gross margin means the business retains $0.40 in gross profit from each dollar of revenue before other expenses.

However, this does not mean the company earns a 40% net profit.

Rent, marketing, administration, and other operating costs may substantially reduce its final profit.

Gross Margin vs. Markup

Gross margin and markup are related but different.

Gross margin compares gross profit with selling price.

Markup compares gross profit with product cost.

For example, suppose you purchase a product for $60 and sell it for $100.

Gross profit is $40.

Gross margin is:

($40 ÷ $100) × 100 = 40%

Markup is:

($40 ÷ $60) × 100 = 66.67%

These are not interchangeable.

Confusing markup with gross margin can cause businesses to set incorrect selling prices.

How to Calculate a Selling Price From Target Margin

You can also calculate the selling price necessary to achieve a chosen gross margin.

The formula is:

Required Selling Price = Unit Cost ÷ (1 − Target Margin)

The target margin must be expressed as a decimal.

For example, if a product costs $60 and you want a 40% gross margin:

Selling Price = $60 ÷ (1 − 0.40)

Selling Price = $100

This formula assumes the cost figure includes the direct costs relevant to your gross margin calculation.

It also assumes the selling price is measured consistently with your revenue figure.

What Is a Good Gross Margin?

There is no single gross margin that is appropriate for every business.

Retailers, restaurants, manufacturers, and software companies operate with very different cost structures.

A higher margin generally provides more room to cover operating expenses, but it does not automatically mean the business is profitable.

The most useful comparison is often against similar businesses and your own previous accounting periods.

A business with declining gross margin may need to investigate rising supply costs, discounting, inventory waste, or a change in product mix.

What Expenses Should Be Included in COGS?

COGS generally includes direct costs attributable to the goods or services sold.

Depending on the business and its accounting method, these may include purchased inventory, raw materials, direct production labor, and certain production overhead.

General marketing expenses and office administration typically belong elsewhere.

However, classification can vary according to business activities and applicable accounting rules.

Avoid changing expense categories merely to make your margin appear higher.

Consistent accounting improves comparisons across periods.

How to Improve Gross Margin

A business can potentially improve gross margin by increasing selling prices, negotiating lower purchasing costs, reducing production waste, or improving operational efficiency.

However, raising prices can also reduce demand.

Similarly, cutting direct costs may reduce product quality or customer satisfaction if done carelessly.

Use the calculator to explore multiple pricing and cost scenarios before making decisions.

You can also compare an investment in improved equipment using our ROI Calculator.

Frequently Asked Questions

What does a 40% gross margin mean?

It means that after direct costs, the business retains 40 cents in gross profit for every dollar of sales revenue, before other operating expenses.

Is gross margin the same as profit margin?

Gross margin is one type of profit margin, but it is not the same as net profit margin. Net profit margin includes additional business expenses.

Can gross margin be negative?

Yes. If COGS exceeds revenue, gross profit and gross margin become negative.

Final Thoughts

Gross margin is a practical measure for understanding product profitability and pricing.

Use the Gross Margin Calculator above to compare sales, direct costs, and pricing decisions.

For a complete picture of business performance, review gross margin alongside operating expenses, net profit, cash flow, and return on investment.

Gross Margin Calculator – Profit & Markup