Profit Margin Calculator: Gross Margin, Net Margin & Markup Free Online
Calculate profit, revenue, gross and net margin, and markup β pick the mode that matches what you already know.
Enter Cost & Revenue
Results update instantly. Add operating expenses to see net figures.
Profit Margin Formulas Explained
This calculator solves for profit, revenue, or margin depending on which two numbers you already have. Pick a mode, enter your cost alongside the second value the mode asks for, and the tool fills in everything else: gross profit, gross margin, markup on cost, and, if you add operating expenses, net profit and net margin too. You never have to remember which formula applies to which situation β the calculator picks it for you based on the mode you select.
Revenue β Cost of Goods Sold (COGS)(Gross Profit Γ· Revenue) Γ 100Gross Profit β Operating Expenses(Net Profit Γ· Revenue) Γ 100(Gross Profit Γ· Cost) Γ 100Cost Γ· (1 β Margin % Γ· 100)How the three modes work
Choose Cost + Revenue when you know what you paid for a product and what you sold it for. The calculator subtracts cost from revenue to get gross profit, then divides by revenue to get gross margin. Choose Cost + Profit when you already know your target dollar profit and want to know what revenue that requires. Choose Cost + Margin % when you're pricing a product backward from a target margin, for example when a retailer needs a 40% margin on every item and wants to know the price. In that mode the calculator solves revenue as cost divided by one minus the margin fraction, then derives profit and markup from there.
Margin vs. Markup
Margin is profit as a percentage of revenue. Markup is profit as a percentage of cost. A 30% margin on a $100 item means $30 profit and $70 cost. A 30% markup on that same $70 cost gives $91 revenue and only a 23% margin. People confuse the two constantly, and the gap between them widens as margins climb, so a business that prices by markup often ends up with thinner margins than it expects. If you're setting retail prices from a supplier cost, run the numbers through the Cost + Margin % mode rather than adding a flat markup percentage.
Gross vs. Net margin
Gross margin only subtracts the direct cost of producing or buying the product (COGS). Net margin also subtracts operating expenses: rent, salaries, marketing, software, and everything else it takes to run the business day to day. Gross margin tells you whether a product itself is profitable. Net margin tells you whether the business as a whole is profitable after covering overhead. Add your operating expenses above to unlock net figures and see both numbers side by side.
Common use cases
Retailers use this calculator to set shelf prices that hit a target margin after accounting for wholesale cost. Freelancers and agencies use it to check whether a project quote leaves enough room after expenses. E-commerce sellers plug in product cost, shipping, and platform fees as operating expenses to see the real net margin on a listing, not just the sticker markup. Manufacturers compare gross margin across product lines to decide where to invest production capacity. Anyone negotiating a wholesale or supplier contract can use the Cost + Margin % mode to work backward from an acceptable margin to a maximum price they're willing to pay.
Tips for accurate results
Include every cost that goes directly into the product in your COGS figure: materials, direct labor, packaging, and inbound shipping. Leave indirect costs like office rent or salaried staff out of cost and put them in operating expenses instead, otherwise your gross margin will understate how profitable the product actually is. When you're comparing margins across products or time periods, keep your definition of cost consistent, since mixing direct and indirect costs from one calculation to the next makes the comparison meaningless. If a number looks off, check the mode you're in first; entering a revenue figure into the profit field is the most common source of a wrong result.
All calculations run locally in your browser. Nothing you enter here is sent to a server or stored anywhere outside your own device's local storage.
Related: Break-even Calculator to find the minimum volume needed to turn a profit, or Small Business Financial Tracker for a full P&L view.
Typical margin benchmarks
Frequently Asked Questions
Is the Profit Margin Calculator free?
Yes β completely free. No account and no data sent to a server.
Does it store my data anywhere?
No. All calculations happen in your browser. Nothing is transmitted to any server.
Do I need an account?
No account, no login, and no signup required.
What is the difference between margin and markup?
Margin is profit as a percentage of revenue. Markup is profit as a percentage of cost. A 30% margin on $100 revenue means $30 profit and $70 cost. A 30% markup on $70 cost gives $91 revenue and a 23% margin β not 30%. They are easy to confuse and produce different numbers from the same inputs.
What is a healthy profit margin?
It depends heavily on industry. Software companies often operate at 60β80% gross margin. Retail e-commerce runs 20β45%. Restaurants operate at 3β15%. Comparing your margin to your industry benchmark matters more than any single number.
What is the difference between gross and net margin?
Gross margin only subtracts the direct cost of producing your product or service (COGS). Net margin also subtracts all operating expenses β rent, salaries, marketing, software β giving a true picture of bottom-line profitability.