About the Margin Calculator
Margin Calculator helps estimate the key numbers involved in other decisions. It is designed for quick scenario comparison: enter a realistic set of values, calculate the result, then change one assumption at a time to see what has the greatest effect. Unlike a static table, the result responds to your inputs and keeps the calculation in your browser. Amounts are displayed in U.S. dollars for consistency, but the mathematical formulas can be used with another currency when every monetary input uses that same currency.
How to use this calculator
Enter values that match your situation and select Calculate result. Review the main result and its supporting figures, then change one input at a time to compare scenarios. Results are rounded for readability while the calculation retains additional precision internally.
Information you will need
- Revenue
- COGS
How the calculation works
Gross profit margin as percentage of revenue. Read the primary result together with the supporting values rather than focusing on one number alone. A useful estimate should make its assumptions visible. If the answer looks surprising, verify the unit, rate, time period, and whether the entered value is gross or net. Run a conservative and an optimistic scenario to understand the range of possible outcomes.
Formula or method
Margin = (Revenue - COGS) / Revenue × 100.
Worked example
$100K revenue - $60K COGS = 40% margin.
The example is illustrative rather than a recommendation. Use your own verified values and keep all monetary or measurement units consistent. When comparing alternatives, save or note each result so the assumptions do not become mixed.
How to interpret the result
The primary output answers the main question posed by the margin calculator, while the additional cards provide context. A result with many decimal places is not necessarily more certain. The displayed precision makes comparison easier, but uncertainty in the inputs can be larger than the rounding difference.
Compare the result with a second scenario using a less favorable rate, return, cost, or time period. This sensitivity check often provides more useful planning information than one best-case projection.
Limitations and important notes
The margin calculator is a planning tool, not a quote, filing calculation, lending decision, or promise of future performance. It does not automatically retrieve live market rates or apply every fee, tax bracket, program rule, product limit, or state law. Rules for products such as FHA, VA, Social Security, retirement accounts, and taxes can change. Confirm time-sensitive values with the lender, plan administrator, IRS, SSA, or another relevant authority before acting.
Frequently asked questions
What is the difference between margin and markup?
Margin is profit expressed as a percentage of the selling price; markup is profit expressed as a percentage of cost. Buy an item for $100 and sell it for $150: your profit is $50, which is a 33.3% margin ($50 / $150) but a 50% markup ($50 / $100). The confusion is costly, because adding 50% to cost gives $150, but that is only a 33.3% margin, not 50%. For a true 50% margin you must double the cost. This calculator shows both figures for any cost and selling price.
How do I calculate gross margin?
Gross margin = (revenue - cost of goods sold) / revenue x 100. If you sell $50,000 of goods and the COGS is $30,000, gross profit is $20,000 and gross margin is $20,000 / $50,000 x 100 = 40%. That means 40 cents of every sales dollar remains before operating expenses, marketing, and taxes. Gross margin measures how profitably you buy and price products, while net margin subtracts all other costs. This calculator computes margin and markup from your cost and selling price automatically.
How do I set a selling price to achieve a target margin?
To hit a specific margin, divide your cost by (1 - desired margin as a decimal). For a 30% margin on a $40 product: $40 / (1 - 0.30) = $40 / 0.70 = $57.14. Check the math: profit is $17.14, and $17.14 / $57.14 = 30%, correct. The most common mistake is adding the percentage to cost instead, since pricing $40 at $52 (cost x 1.30) only delivers a 23% margin. Use this target-margin formula whenever your goal is a specific margin rather than a markup.
If I want a 50% profit margin, what markup do I need?
A 50% margin requires a 100% markup, meaning you must double your cost. If something costs $50 and you sell it for $100, profit is $50, which is 50% of the selling price (margin) and 100% of the cost (markup). A 50% markup only delivers a 33.3% margin, because $25 profit divided by a $75 price equals 33.3%. The conversion formulas are: markup = margin / (1 - margin), and margin = markup / (1 + markup). A 50% margin and a 100% markup are the same thing seen from two perspectives.
What is a good profit margin for retail and ecommerce?
It depends on the business model. Retail gross margins typically run 30-50%, but net margins after all operating costs average only 2-10%. Online and ecommerce businesses often show 55-70% gross margins but a healthy net margin of roughly 10-20%. Specialty and fashion retail can net 7-9%, while groceries operate on very thin net margins of about 2%. Compare your margin to your own industry and category rather than a single universal number, and remember gross margin looks much healthier than net margin, since the gap is your overhead, ads, shipping, and fees.
Why is the markup percentage always higher than the margin percentage?
Because they use different denominators. Markup divides profit by cost, while margin divides the same profit by the larger selling price. Since the selling price is bigger than the cost, the same dollar profit produces a smaller percentage for margin. Example: a $40 profit on a $100 sale is a 40% margin but a 66.7% markup. Markup can even exceed 100% (a 200% markup is a 66.7% margin), while margin can never reach 100% unless the item is free. Knowing this difference prevents under- or over-pricing your products.
What is the difference between gross margin and net margin?
Gross margin = (revenue - cost of goods sold) / revenue. It shows how efficiently you source and sell products. Net margin = (revenue - all expenses) / revenue, including rent, wages, marketing, shipping, fees, interest, and taxes. A store can have a 45% gross margin yet only a 5% net margin after operating costs, a common reality in ecommerce. Gross margin tells you about product pricing, while net margin tells you whether the whole business is profitable. Track both, and use this calculator to check the gross margin on any product.