Margin Calculator
See how much of each sale remains after product cost, then price with a target gross margin in mind.
- 2026 figures, checked October 26, 2026
- Private: runs in your browser
- How we check our work
Result
…
Verify before you act: review these results with a CPA or other qualified financial professional before making any decision based on them.
Suggestions for your numbers
Updated as you type, from your inputs only. General information, not personal advice; confirm any change with a qualified professional.
See it over time
Hover over or tap the chart to see the numbers for any point.
What is gross margin?
A margin calculator shows how much of your selling price remains after subtracting cost. Gross margin is gross profit expressed as a share of the selling price. The profit margin calculator can also work backward from a target margin to estimate the price you need.
For each unit, gross profit is selling price minus cost. Gross margin = (price - cost) / price. To find the price for a target margin, use price = cost / (1 - margin). The result is a percentage of revenue, not a dollar amount. Gross profit is the dollar amount left after the cost you entered.
Why gross margin matters
Gross margin helps you judge whether a product's price covers its cost and leaves room for the rest of the business. You can use it when setting prices, reviewing a supplier quote, comparing products, or deciding whether a promotion makes sense. A gross profit calculator also makes the dollars behind the percentage easier to see.
A product can bring in revenue and still leave too little gross profit to help pay for rent, payroll, marketing, software, shipping, and other operating expenses. Margin does not include those costs unless you include them in the cost input. It is not the same as net profit, which accounts for more expenses.
Track margin alongside sales volume and cash flow. A price change may improve margin per unit but reduce the number of units customers buy. Use your own sales records and cost data to understand the tradeoff before changing prices, hiring, or committing to a supplier.
How to use this margin calculator
- Choose “Margin from cost and price” to calculate gross margin from a known cost and selling price.
- Enter the cost for the item or service. Use a consistent basis: if the price is per unit, enter the cost per unit.
- Enter the selling price charged to the customer on the same basis as the cost.
- Review gross profit, gross margin, and markup in the results. Gross profit is shown in dollars; margin and markup are percentages.
- Choose the target-margin option when you know your cost and want to estimate the selling price required. Enter the target margin as a percentage and review the calculated price.
- Check that the cost reflects the expenses you intend to include. If you want to account for packaging, freight, or direct labor, include those costs when they belong in your product cost.
Margin calculator example
Worked example
With a cost of $60 and a selling price of $100, gross profit is $40.00 per unit and gross margin is 40.00%. The result also shows markup of 66.67%. These values follow the formula: subtract cost from price to find profit, then divide profit by price to find margin.
How to read your margin results
Gross margin tells you what share of the selling price remains after the entered cost. In the example, the calculator reports 40.00% gross margin and $40.00 gross profit per unit. The rows for cost and price show the inputs used, so check them before acting on the result.
The target-price result is an estimate based on the cost and target margin you enter. A higher target margin requires a higher price for the same cost. Compare that price with customer demand, competing offers, and your sales history rather than treating the calculation as a guaranteed selling price.
How to improve gross margin
- 01
Review supplier costs
Ask suppliers for updated quotes, compare equivalent products, or renegotiate terms. Check freight, packaging, and other direct costs too; a lower quoted unit price may not reduce your full cost if other charges rise.
- 02
Test a thoughtful price change
Use the target-margin calculation to see the price that matches your goal. Consider testing a change on a product or customer group, then compare sales and gross profit with your prior results before applying it more widely.
- 03
Reduce avoidable waste
Review returns, damaged goods, rework, and discounts. Find the cause and adjust purchasing, handling, or quality checks so fewer costs are absorbed without a sale.
- 04
Review the product mix
Compare margin and sales for each product or service. Consider featuring items that contribute more gross profit, while checking that customers still have options they value.
Common margin calculator mistakes
Mixing margin with markup
Both describe profit in relation to another amount, but they use different bases. Margin divides profit by price; markup divides it by cost. Use the measure that matches the question you are trying to answer.
Entering costs on a different basis
Do not compare a per-unit cost with a total-order price. Make sure cost and selling price refer to the same item, service, or sales quantity.
Leaving out relevant direct costs
If your cost input includes only the purchase price, the result will not reflect direct expenses you left out. Decide what belongs in product cost and apply that choice consistently when comparing items.
Treating gross margin as take-home profit
Gross margin does not automatically cover operating expenses, taxes, debt payments, or owner compensation. Use it as one part of a broader review of business finances.
The margin formula
Margin = (price - cost) / price. Price for a target margin = cost / (1 - margin).
Key terms
- Gross profit
- Selling price minus the cost entered for the product or service.
- Gross margin
- Gross profit divided by selling price, expressed as a percentage.
- Markup
- Gross profit divided by cost, expressed as a percentage.
- Target margin
- The gross margin you want to achieve; the calculator uses it with cost to estimate a selling price.
Margin questions
What is the difference between margin and markup?
Margin divides profit by price; markup divides it by cost.
Can gross margin be negative?
Yes. If the cost you enter is greater than the selling price, the sale has a loss before other business expenses. Check the inputs and review whether the price or direct costs need attention.
Does gross margin include operating expenses?
Not unless you include them in the cost input. Gross margin usually compares selling price with the cost assigned to the product or service. Expenses such as rent and marketing are generally considered separately.
Why calculate a target selling price?
It helps you estimate the price that would produce your chosen gross margin for a given cost. Use the estimate as a planning aid, then consider customer demand, sales history, and other business costs.
Should I use gross margin or net profit to set prices?
Gross margin helps assess the relationship between price and direct cost. Net profit reflects more of the business's expenses. Consider both when reviewing prices and ask an accounting professional if you need help deciding which costs to include.
Before you act on this result. Cordwell calculators and guides are educational estimates, not legal, tax, investment, lending or other professional advice. They rely on the numbers you enter and on simplified rules, and they can't see your full situation. Before you file, sign, borrow, invest, hire, change your withholding or form a business based on anything here, meet with a CPA or other qualified financial professional who can review your specific facts and confirm the numbers. Rules change, and official agency guidance always controls.