Margin Calculator

Calculate profit and margin percentage from revenue and cost. Use the result to evaluate pricing, product profitability, sales performance, and cost changes accurately for businesses.

💹 Enter your business numbers

📊 Margin vs Markup Reference

Markup Margin Markup Margin
10%9.09%60%37.50%
15%13.04%65%39.39%
20%16.67%70%41.18%
25%20.00%75%42.86%
30%23.08%80%44.44%
35%25.93%85%45.95%
40%28.57%90%47.37%
45%31.03%95%48.72%
50%33.33%100%50.00%
55%35.48%200%66.67%
* Markup is based on cost; Margin is based on revenue

📈 Your margin results

Profit Margin 0.00%
Markup 0.00%
Profit $0.00
Revenue $0.00
Cost $0.00
Profit $0.00
For every $1 of revenue $0.00 is profit
Profit per unit $0.00

Formula Used

Margin = [(Selling price − Cost) ÷ Selling price] × 100

How the formula is applied

The calculation uses the price, revenue, cost, rate or quantity fields shown by the tool. Gross and net figures are not interchangeable, and taxes, overhead, returns, discounts or financing should be included only in the field intended for them.

Calculator Description

Margin Calculator

The Margin Calculator determines the profit earned from a sale and expresses that profit as a percentage of revenue. Enter the selling price or revenue and the total cost associated with the product, service, or transaction. The calculator returns the profit amount and profit margin percentage, helping businesses evaluate pricing, compare products, review costs, and estimate profitability.

Margin measures how much of each revenue dollar remains after the included costs are deducted. A 30% margin means that $0.30 of every $1.00 in revenue remains as profit before any costs excluded from the calculation.

How to Use the Margin Calculator

  1. Enter the revenue or selling price: Use the amount received from the sale before subtracting the relevant costs.
  2. Enter the cost: Include the cost directly associated with producing, purchasing, or delivering the item or service.
  3. Calculate the result: The calculator subtracts cost from revenue to determine profit, then divides profit by revenue to calculate margin.
  4. Review the scope: Confirm whether your inputs represent one unit, one order, one project, or an entire reporting period.

Both inputs must use the same currency and cover the same unit or timeframe. For a U.S. business, amounts will normally be entered in U.S. dollars. However, the formula works with any currency when both values use that currency consistently.

How the Margin Calculator Works

The Margin Calculator subtracts cost from revenue and divides the resulting profit by revenue. It then multiplies the result by 100 to display the margin as a percentage.

The calculation can be performed for an individual product, an ecommerce order, a client project, a sales channel, or a complete business period. The meaning of the result depends on which costs are included. Using only cost of goods sold generally produces a gross margin. Including operating expenses, interest, taxes, and other applicable costs may produce an operating or net margin, depending on the accounting definition used.

Consistency is essential when comparing results. A unit selling price must be matched with a unit cost, while monthly revenue must be matched with costs incurred for that same month.

Margin Calculator Formula

Profit = Revenue − Cost

Margin (%) = ((Revenue − Cost) ÷ Revenue) × 100

  • Revenue: The selling price or income generated before deducting the costs included in the calculation.
  • Cost: The applicable expense required to purchase, produce, or deliver the product or service.
  • Profit: Revenue minus the included cost.
  • Margin: Profit expressed as a percentage of revenue.

Revenue must be greater than zero for a standard margin percentage to be calculated. If revenue is zero, division by zero makes the percentage undefined.

Margin Calculator Example

Suppose a U.S. ecommerce retailer sells a kitchen appliance for $160. The product, inbound freight, and packaging cost the retailer $104 per unit.

Inputs

  • Revenue per unit: $160
  • Cost per unit: $104

Formula

Profit = Revenue − Cost

Margin (%) = (Profit ÷ Revenue) × 100

Calculation

Profit = $160 − $104 = $56

Margin = ($56 ÷ $160) × 100 = 35%

Result

Metric Result
Profit per unit $56
Profit margin 35%

Interpretation

The retailer retains $56 from each $160 sale after paying the $104 of included costs. That amount equals 35% of revenue. If advertising fees, payment-processing charges, returns, overhead, taxes, or other expenses were excluded, the result should not be interpreted as net profit margin.

How to Interpret the Result

A higher positive margin means a larger portion of revenue remains after the selected costs. A lower positive margin means those costs consume more of each sales dollar. A zero margin indicates that revenue equals cost, while a negative margin indicates that the included costs exceed revenue.

Result Meaning
Positive margin Revenue is greater than the costs included in the calculation.
Zero margin Revenue equals the included costs, producing no profit on that basis.
Negative margin The included costs exceed revenue, resulting in a loss.
Margin above 100% Usually signals negative cost, unusual adjustments, or incorrect inputs in a standard sales calculation.

There is no universal ideal margin. Results vary by industry, product category, sales channel, business model, company maturity, competitive conditions, and the costs included. A useful comparison should apply the same accounting method across products or periods.

Factors That Affect Profit Margin

  • Selling price: Increasing price can raise margin when cost remains constant, but changes in demand, discounts, and returns may affect the realized result.
  • Product or production cost: Material, labor, supplier, manufacturing, and procurement costs directly influence gross profit margin.
  • Shipping and fulfillment: Freight, warehousing, packaging, and delivery expenses can materially reduce per-order profitability.
  • Discounts and refunds: Promotions, coupons, rebates, returns, and chargebacks reduce realized revenue or add costs.
  • Channel fees: Marketplace commissions, affiliate payments, payment-processing charges, and platform fees affect channel-level margin.
  • Sales mix: Total margin can change when customers purchase different proportions of high-margin and low-margin products.
  • Operating expenses: Payroll, rent, software, insurance, and administrative expenses matter when calculating operating or net margin.
  • Input timing: Cost changes, delayed invoices, inventory accounting, and one-time expenses can affect period comparisons.

How Businesses Use Profit Margin

Pricing Decisions

Businesses can test how a proposed selling price affects unit profit and margin. The result should be considered alongside customer demand, competitive pricing, taxes, and channel costs.

Product and Service Comparison

Applying a consistent cost definition allows a company to compare the profitability of products, service packages, projects, or customer segments. Margin percentage can be more comparable than profit dollars when selling prices differ.

Ecommerce Analysis

Online sellers can calculate margin after product cost, fulfillment, marketplace fees, payment charges, discounts, and expected returns. Separate calculations can reveal whether the same item performs differently across sales channels.

Budgeting and Forecasting

A projected margin can be applied to expected revenue to estimate profit under stated assumptions. Scenario calculations can show how supplier price changes, discounts, or different sales volumes may affect the plan.

Sales and Marketing Review

Margin provides context for revenue growth. A campaign may generate more sales while producing less profit if discounts, advertising costs, commissions, or fulfillment expenses rise substantially.

Cost Control

Comparing margin across equivalent periods can help identify changes in purchasing, production, labor, or delivery costs. The comparison is meaningful only when revenue and cost classifications remain consistent.

Margin vs. Markup

Margin and markup both compare profit with another amount, but they use different denominators. Margin divides profit by revenue, while markup divides profit by cost.

Metric Formula Comparison Base
Margin Profit ÷ Revenue × 100 Selling price or revenue
Markup Profit ÷ Cost × 100 Cost

In the example above, the $56 profit represents a 35% margin on $160 of revenue. The same transaction has a markup of approximately 53.85% because $56 is divided by the $104 cost. These percentages are not interchangeable.

Common Mistakes

  • Using cost as the denominator: Dividing profit by cost calculates markup, not margin.
  • Confusing revenue with profit: Revenue is the amount earned before costs; profit is what remains after the selected costs.
  • Mixing unit and total figures: Do not compare the selling price of one unit with the cost of an entire order or period.
  • Using different timeframes: Monthly revenue should not be compared with quarterly or annual costs.
  • Omitting relevant costs: Freight, packaging, commissions, transaction fees, discounts, refunds, and labor may materially change the result.
  • Calling gross margin net margin: A calculation based only on cost of goods sold does not account for all operating and non-operating expenses.
  • Entering percentages incorrectly: A calculated decimal of 0.35 equals 35%, not 0.35%.
  • Using list price instead of realized revenue: Discounts, refunds, and allowances may make actual revenue lower than the advertised price.
  • Ignoring taxes collected for the government: Sales tax collected from customers is generally not business revenue and should normally be excluded from the selling amount.

Frequently Asked Questions

What does a margin percentage mean?

Margin percentage shows the share of revenue remaining as profit after the costs included in the calculation. A 25% margin represents $25 of profit for every $100 of revenue on that basis.

How do I calculate profit margin?

Subtract cost from revenue to find profit. Divide profit by revenue and multiply by 100. For example, $30 of profit from $120 of revenue produces a 25% margin.

Can a profit margin be negative?

Yes. A negative margin occurs when the included costs exceed revenue. It indicates a loss for the product, transaction, project, or period being measured.

What is the difference between gross margin and net margin?

Gross margin typically subtracts cost of goods sold from revenue. Net margin accounts for a broader set of expenses, potentially including operating costs, interest, and taxes. Exact classifications should follow the business’s accounting practices.

Is margin calculated from cost or selling price?

Margin is calculated from selling price or revenue. A percentage calculated from cost is markup.

How can I calculate the selling price for a target margin?

When cost and the desired margin are known, use: Selling Price = Cost ÷ (1 − Target Margin as a decimal). A target margin of 30% should be entered as 0.30 in the formula.

How to Use This Calculator

  1. Enter the revenue, cost, price or cash-flow values requested.
  2. Review the values for unit, decimal and time-period consistency.
  3. Select Calculate, Convert or Update to generate the estimate.
  4. Review the main result, detailed breakdown and the result chart when a meaningful visualization is available.
  5. Change one input at a time to compare scenarios before using the result.

Practical example and result check

Enter a realistic current case, calculate the result, then raise the cost or lower the selling price. The comparison shows how sensitive the margin, break-even point, tax amount or total cost is to that change.

Before relying on the result

  • Confirm the units, dates, rates and time periods entered.
  • Review which costs, measurements or assumptions are included and excluded.
  • Change one important input at a time to understand the result sensitivity.

Detailed Calculator Guide

Additional Margin Calculations

Beyond calculating margin from revenue and cost, businesses may need to determine a selling price, estimate profit from a known margin, or test how cost and price changes affect profitability.

Calculate Selling Price From a Target Margin

Selling Price = Cost ÷ (1 − Target Margin)

Enter the target margin as a decimal. For example, use 0.30 for a 30% target margin.

If a product costs $70 and the business wants a 30% margin:

Selling Price = $70 ÷ (1 − 0.30) = $70 ÷ 0.70 = $100

A $100 selling price produces $30 in profit and a 30% margin before considering any costs excluded from the $70 input.

Calculate Profit From Revenue and Margin

Profit = Revenue × Margin

If monthly revenue is $50,000 and the margin is 24%:

Profit = $50,000 × 0.24 = $12,000

Calculate Cost From Revenue and Margin

Cost = Revenue × (1 − Margin)

If revenue is $20,000 and the margin is 35%:

Cost = $20,000 × (1 − 0.35) = $13,000

Margin Scenario Comparison

Testing several pricing and cost combinations can show how operational changes affect margin. The following scenarios use a product with an original selling price of $100 and a cost of $70.

Scenario Revenue Cost Profit Margin
Original transaction $100 $70 $30 30%
10% price discount $90 $70 $20 22.22%
$5 cost increase $100 $75 $25 25%
$5 price increase $105 $70 $35 33.33%

The comparison demonstrates that a 10% price discount does not reduce margin by only 10%. Profit falls from $30 to $20, while margin declines from 30% to approximately 22.22%. Businesses should calculate the financial effect of discounts instead of assuming that revenue and margin change at the same rate.

Which Costs Should Be Included?

The correct cost input depends on the purpose of the analysis. Clearly defining the cost scope prevents gross, contribution, and net profitability measures from being confused.

Analysis Type Costs Commonly Considered Typical Use
Product gross margin Product acquisition or production cost Comparing products and reviewing base pricing
Order-level margin Product cost, packaging, fulfillment, transaction fees, and applicable shipping Evaluating ecommerce orders and sales channels
Contribution margin Variable costs associated with generating the sale Supporting break-even and short-term operating decisions
Net profit margin Operating expenses and other applicable business expenses Evaluating overall company profitability

Accounting definitions can vary by business and reporting purpose. When comparing periods, products, or competitors, confirm that the same types of costs are included in each calculation.

Margin Calculation Edge Cases

  • Zero revenue: Margin percentage cannot be calculated because the formula would require division by zero.
  • Cost equals revenue: Profit and margin are both zero.
  • Cost exceeds revenue: The calculation produces negative profit and a negative margin.
  • Negative revenue: Refunds, reversals, or accounting adjustments require careful interpretation and may not represent a standard sales-margin calculation.
  • Negative cost: Supplier credits or inventory adjustments can produce an unusual margin above 100%. Review the underlying entries before using the result.
  • Mixed tax treatment: Do not include sales tax in one revenue figure while excluding it from another comparison.
  • Rounding differences: Calculate with unrounded inputs when possible and round only the final displayed result.

Checklist Before Comparing Margins

  • Use the same reporting period for revenue and cost.
  • Apply the same cost definition to every comparison.
  • Use actual selling revenue after discounts when available.
  • Account for refunds, returns, rebates, and allowances consistently.
  • Separate margin from markup when setting or reviewing prices.
  • Confirm whether the result represents gross, contribution, operating, or net margin.
  • Compare equivalent products, channels, projects, or business periods.
  • Record assumptions used in forecasts and target-margin calculations.

Supporting Guides