Gross Margin Calculator with Markup and Target Price

Work out gross profit, gross margin and markup from a price and cost, or find the price you need to charge to hit a target margin. The formula is shown every time.

By Amara TaylorFree, no signup

Gross margin calculator

Results update as you type

Enter a price greater than 0.

Enter a cost of 0 or more.

Gross margin

35.00%

    Quick answer: Gross margin = (price − cost) ÷ price × 100. An item that sells for $80 and costs $52 earns $28 gross profit, a 35.00% margin and a 53.85% markup. To hit a target margin, price = cost ÷ (1 − margin).

    How the gross margin calculator works

    • Gross profit = price − cost
    • Gross margin % = gross profit ÷ price × 100
    • Markup % = gross profit ÷ cost × 100
    • Price for a target margin = cost ÷ (1 − target ÷ 100)
    gross margin = (price − cost) ÷ price × 100Margin uses price as its base, markup uses cost.

    Because margin divides by the larger number, it is always lower than markup on the same sale, and it can never reach 100%.

    Worked examples

    One product: $80 price, $52 cost

    1. Gross profit: $80 − $52 = $28.00
    2. Margin: $28 ÷ $80 × 100 = 35.00%
    3. Markup: $28 ÷ $52 × 100 = 53.85%
    4. Reverse check: $52 ÷ (1 − 0.35) = $80.00

    Result: 35.00% margin, 53.85% markup

    A full quarter: $450,000 revenue, $315,000 COGS

    1. Gross profit: $450,000 − $315,000 = $135,000
    2. Margin: $135,000 ÷ $450,000 × 100 = 30.00%
    3. Markup: $135,000 ÷ $315,000 × 100 = 42.86%

    Result: 30.00% gross margin

    The quarterly example comes from our guide to calculating gross margin.

    Gross margin to markup conversion table

    Turn a margin target into the markup and price you need. Prices assume an item that costs $100.

    Gross marginMarkupPrice on $100 costGross profit
    10%11.11%$111.11$11.11
    15%17.65%$117.65$17.65
    20%25.00%$125.00$25.00
    25%33.33%$133.33$33.33
    30%42.86%$142.86$42.86
    40%66.67%$166.67$66.67
    50%100.00%$200.00$100.00
    60%150.00%$250.00$150.00

    Who uses a gross margin calculator

    • Retailers and ecommerce sellers setting prices that cover product cost and overhead.
    • Manufacturers checking products still earn their keep as costs rise.
    • Service businesses and freelancers pricing jobs against direct delivery cost.
    • Founders and analysts comparing margin across products, periods or suppliers.

    Not included: Rent, marketing, salaries not tied to production, interest and tax. This shows gross margin only, not net profit. For the cost figure, see the COGS guide.

    Frequently asked questions

    How do you calculate gross margin from price and cost?

    Subtract cost from price to get gross profit, divide by price and multiply by 100. An item selling for $80 that costs $52 has a 35% gross margin.

    How do I find the selling price for a target margin?

    Divide the cost by one minus the target margin as a decimal. For a 35% margin on a $52 cost, price = $52 ÷ 0.65 = $80.

    Why is my markup higher than my gross margin?

    Both use the same gross profit, but markup divides it by cost and margin divides it by price. Cost is smaller than price on a profitable sale, so markup is always the bigger percentage.

    Can gross margin be 100% or more?

    No. A 100% margin would mean the item cost nothing. Markup can pass 100%, but margin stays below 100% whenever cost is above zero.

    Should I enter one item or total revenue?

    Either, as long as price and cost cover the same thing: one unit for product pricing, or total revenue and total COGS for a month or quarter.

    What does a negative gross margin mean?

    Cost is higher than the selling price, so every sale loses money before any overhead is paid.

    Accuracy note: This applies the standard gross profit, margin and markup formulas to your figures. It is for general information, not accounting advice. Confirm pricing decisions with your accountant.

    Amara Taylor, who builds and maintains Anchor AI Tools
    Written and checked by Amara Taylor

    Content Lead, Anchor AI Tools, California, USA. Spotted an error? Email hello@anchoraitools.com and it will be checked and corrected. See our editorial standards.