Money topics Budget tool
Money Basics

Markup and Gross Margin Calculator: Price from Cost or Check a Sale

Price one item from a direct cost or compare an actual price without mistaking gross margin for net profit.

A 50% markup is not a 50% gross margin. On a $60 direct cost, a 50% markup gives a $90 selling price and $30 gross profit. That is a 33.33% gross margin because the $30 is divided by the $90 price, not by the $60 cost. To target a 50% gross margin instead, the price must be $120.

Use this markup and gross margin calculator to price one item from its direct unit cost or to check an actual sale price. It is about product pricing, not buying investments on margin or a brokerage margin requirement, and gross margin is not net profit.

Markup and gross margin calculator

This calculator runs in your browser. This calculator’s code does not send, save, or track your entries. All dollar amounts are USD.

Optional example: Inputs start blank. Load example fills hypothetical figures without calculating. Examples are not current rates, quotes, or recommendations.

Loading calculator. No entries are submitted.

Which pricing question are you answering?

Select target markup to add a percentage of direct unit cost to that cost. Select target gross margin to make gross profit a share of selling price. Select actual sale price to see both percentages for a real or planned price. Enter direct cost in dollars. Defaults are made-up illustrations, not recommended prices or margins.

In this simple model, gross profit per item = selling price − direct unit cost. Markup percentage = gross profit ÷ direct cost × 100. Gross-margin percentage = gross profit ÷ selling price × 100. To price to a target markup, price = cost × (1 + markup/100). To price to a target gross margin, price = cost ÷ (1 − margin/100).

AccountingCoach’s explanation likewise distinguishes a markup percentage based on cost from a gross-margin ratio based on sales price. See its worked definition.

How the calculator handles inputs and rounding

The target percentage is used only in the two target modes; actual selling price is used only in actual-sale mode. The other input remains visible but does not affect that mode’s answer.

The calculator supports target margins only up to 99.99%.

How do markup and margin targets differ on the same $60 cost?

Example 1: markup target. Enter $60 cost and 50% target markup. The $30 increase produces a $90 price. Gross profit is $30, markup is $30 ÷ $60 = 50%, and gross margin is $30 ÷ $90 = 33.33%. Merely adding 50% to cost does not achieve a 50% margin.

Example 2: margin target. Keep the $60 cost but select target gross margin of 40%. The denominator is the desired selling price, so $60 ÷ (1 − 0.40) = $100. Gross profit is $40; margin is $40 ÷ $100 = 40%, while markup is $40 ÷ $60 = 66.67%. A 40% markup, by contrast, would price the item at $84 and yield only 28.57% gross margin.

Same $60 direct cost, different pricing instructions
Instruction Price Gross profit Markup on $60 cost Margin on price
50% target markup $90.00 $30.00 50.00% 33.33%
40% target gross margin $100.00 $40.00 66.67% 40.00%
Actual $50 sale $50.00 −$10.00 −16.67% −20.00%

What to check. For the below-cost $50 sale, the actual-price mode retains the negative gross profit. It does not turn a loss into a positive “margin.”

A cost of $0 makes markup undefined because dividing by zero is not a percentage; a selling price of $0 makes gross margin undefined. Target pricing requires a positive cost, and a 100% or higher target margin cannot produce a finite positive-cost selling price.

Is gross margin the same as net profit?

Gross profit is what remains after the entered direct unit cost, before expenses that are not in that number. AccountingCoach describes gross margin as preceding selling, general and administrative, and interest expenses. Read its gross-margin definition.

A real business might also face payment processing, shipping, returns, labor, rent, advertising, taxes and financing. Which costs belong in direct cost depends on the product and accounting method; this small unit-price model does not decide how to classify them. It has no optional selling-fee input and makes no after-all-expenses or tax claim.

Try entering actual prices for several scenarios and checking whether the gross profit dollars cover the unmodeled costs. A target percentage alone cannot predict sales volume, customer response, or actual profitability.

If you are comparing a recurring expense rather than a product selling price, see the annual versus monthly subscription comparison. For a broader spending plan, see the irregular-income budget guide.

The SEC’s financial-statement guide likewise separates gross profit from later operating expenses, interest and taxes. IRS Publication 334, Chapter 7, describes subtracting cost of goods sold from net receipts to determine gross profit. These sources support the boundary between gross and net results; this calculator does not prepare financial statements, classify deductible costs or calculate taxable income.

When does this margin calculator not fit?

  • Investment or trading margin. It prices goods from a unit cost; it does not calculate buying on margin, margin loans or brokerage margin requirements.
  • Net profit after all expenses. Selling fees, shipping, labor, rent, advertising and taxes are not modeled unless you have already built them into direct cost.
  • Forecasting sales or demand. A target percentage cannot predict sales volume or customer response.
  • Accounting or tax reporting. It does not prepare financial statements, classify deductible costs or calculate taxable income.

Quick decision checklist

  • Decide whether your goal is stated as markup on cost or gross margin on price.
  • Enter a direct unit cost that uses the cost classification you actually follow.
  • Compare the resulting gross profit dollars with the costs this model leaves out.
  • Check an actual or planned sale price in actual-sale mode, including below-cost cases.

Sources and review

Inputs are calculated in the browser model; this calculator does not request accounts or live prices. Rounded displayed values can differ slightly from unrounded intermediate calculations. Prepared with AI-assisted research, drafting, and calculation checks. Not independently reviewed by a human financial professional.

This article is general educational information, not individualized financial advice.