Margin Calculator

Margin Calculator
Fully Editable
Instant Download
Professional Design
Pre-Built
No Expertise Is Needed
Description

Margin Calculator

Use any two pricing values to calculate cost, revenue, gross profit, margin, markup, and a practical price-sensitivity view.

Revenue $100.00 Profit $40.00 Margin 40.00% Markup 66.67%

Inputs

Choose which two values you know. The other two fields become live calculated outputs.

Changing the pair carries the current calculated values into the newly editable fields.

Choose a valid input pair.

Input

The direct cost of the item or service before gross profit.

Enter a non-negative cost.

Input

Gross profit as a percentage of revenue. A 100% margin is valid only when direct cost is zero.

Enter a valid margin for the selected input pair.

Calculated

The selling price or sales amount before subtracting cost.

Enter revenue greater than zero where required.

Calculated

Revenue minus cost. Negative values represent a gross loss.

This combination does not produce a valid non-negative cost and revenue.

Live results

All figures use full precision internally and round only for display.

Revenue required $100.00
Gross profit $40.00
Gross margin 40.00%
Markup on cost 66.67%
Cost share 60.00%
Price multiple 1.67×
Profit per $100 sales $40.00
Core relationship margin = (revenue − cost) ÷ revenue

A 40.00% margin means $40.00 of gross profit for every $100.00 of revenue.

Revenue composition

See how each sales dollar is divided between direct cost and gross profit.

Cost consumes 60.00% of revenue, leaving a 40.00% gross margin.
Component Amount Share of revenue

Margin sensitivity

The chart holds cost constant and shows how required revenue and gross profit change across target margins.

At a 50% margin, a $60.00 cost requires $120.00 of revenue and produces $60.00 of gross profit.
Target margin Required revenue Gross profit Markup on cost
Each row keeps the current cost fixed. As margin approaches 100%, required revenue rises nonlinearly because the denominator in cost ÷ (1 − margin) becomes smaller.

What does this margin calculator estimate?

This calculator connects four core pricing figures: cost, revenue, gross profit, and gross margin. Supply any two values and it solves the remaining two. It also translates margin into markup, cost share, price multiple, and profit per $100 of sales. These outputs are useful for product pricing, service quotes, wholesale decisions, and quick gross-profit checks. They are not a complete income statement because operating expenses, financing costs, taxes, returns, and other indirect items may sit outside the direct cost used here.

Gross margin is a ratio based on revenue. Gross profit is the currency amount left after subtracting direct cost. The IRS guide for small businesses explains how cost of goods sold and gross profit appear in business records, while the SEC financial statement guide provides broader context for interpreting revenue, expenses, and profit.

How should you use each input?

Use as inputs

Select the two figures you already know. “Cost + margin” is useful when setting a selling price from a target margin. “Cost + revenue” works when auditing an existing sale. “Cost + profit” is appropriate when you need a fixed dollar profit. “Margin + revenue” backs into allowable cost, while “margin + profit” estimates the revenue and cost consistent with both targets. “Revenue + profit” calculates cost and margin from actual results. Switching pairs carries the current model values into the new editable fields, reducing re-entry errors.

Cost

Enter the direct cost associated with the sale, normally in dollars. It is required whenever the selected pair includes cost. A higher cost lowers profit and margin when revenue is fixed, or raises the required selling price when margin is fixed. Include costs consistently: mixing unit cost with total revenue, or including overhead in one scenario but not another, makes comparisons unreliable.

Margin

Enter gross margin as a percentage of revenue. A 40% margin means 40 cents of gross profit for each dollar of revenue. When cost and margin are used to solve revenue, the margin must stay below 100%. In other input modes, a 100% margin is valid only when direct cost is zero. Negative margin is allowed and represents a gross loss. Do not confuse margin with markup: margin divides profit by revenue, whereas markup divides profit by cost.

Revenue

Revenue is the selling price for one unit or total sales for the same period and scope as cost. Use a value greater than zero when revenue is one of the selected inputs. Raising revenue while cost stays fixed increases both profit and margin. A common mistake is entering sales tax collected from the customer as revenue even when that tax is payable to a government authority rather than earned by the business.

Gross profit

Gross profit equals revenue minus direct cost. It may be positive, zero, or negative. A higher profit target raises the required revenue when cost is fixed. When margin and profit are the chosen inputs, they must point in a mathematically consistent direction: a positive margin requires positive profit, while a negative margin corresponds to a gross loss.

How are the results calculated?

The central formula is margin = (revenue − cost) ÷ revenue. Gross profit is simply revenue minus cost. When cost and margin are known, required revenue is cost ÷ (1 − margin), with margin expressed as a decimal. Markup is profit ÷ cost. Cost share is cost ÷ revenue, and the price multiple is revenue ÷ cost. The model keeps full precision for calculations and rounds only the visible display and workbook cells.

Markup can rise much faster than margin. For example, a 50% margin equals a 100% markup because the selling price is twice cost. An 80% margin equals a 400% markup. This nonlinear relationship is why changing a target margin near 100% can produce a very large required price. A concise explanation of the distinction is also available in Investopedia’s gross margin overview.

How should you interpret every output?

Revenue required is the selling price or sales total needed for the selected assumptions. Gross profit is the amount remaining after direct cost. Gross margin expresses that profit relative to revenue, making it easier to compare products of different sizes. Markup on cost shows profit relative to cost and is often used when applying a pricing multiplier. Cost share is the portion of each sales dollar consumed by direct cost. Price multiple shows how many times cost is embedded in the selling price. Profit per $100 sales converts margin into an intuitive dollar amount.

A zero margin means revenue exactly equals cost. A negative margin means the sale does not recover direct cost. A high gross margin may provide more room for payroll, rent, marketing, support, depreciation, returns, and taxes, but it does not automatically imply a high net margin. The U.S. Small Business Administration finance guide offers practical context for monitoring broader business finances beyond a single gross-margin calculation.

What do the chart and tables show?

The revenue-composition donut divides current revenue into cost and positive gross profit. Its legend and table use the same calculated amounts and percentages. In a loss scenario, the donut is intentionally replaced by a compact message because a negative category cannot be represented honestly as a share of a positive whole; the result cards and tables still show the loss.

The margin-sensitivity line chart holds current cost constant and compares required revenue with gross profit at target margins from 0% to 80%. The curve becomes steeper as target margin rises. The table beneath the chart lists exact values and markup for every point, which is useful when selecting a practical target rather than relying only on a visual estimate. Download Excel exports the current inputs, results, composition, sensitivity rows, and calculation notes into a real workbook for review or further modeling.

What mistakes should you avoid?

  • Do not mix per-unit cost with monthly or annual revenue. Keep every figure on the same scope and time basis.
  • Do not use markup and margin as interchangeable percentages; they have different denominators.
  • Do not omit freight, packaging, merchant fees, or labor when those items are genuinely direct costs for the decision being analyzed.
  • Do not treat gross margin as net profit. Indirect operating expenses still need to be covered.
  • Do not assume a mathematically possible price is commercially achievable. Test customer demand, competitor positioning, discounts, returns, and channel fees separately.