Find your gross profit and profit margin percentage in seconds. Enter your revenue and costs in the calculator above, then read the complete guide below to understand the formula, see worked examples, and avoid the mistakes that make margin math go wrong.
Using this calculator takes less than a minute, and you only need two numbers: total revenue and total costs. Revenue is the full amount of money coming in before any expenses are removed. For a shop, revenue is total sales. For a freelancer, it is total billings. For a landlord, it is rent collected. Costs are everything you spent to earn that revenue: materials, wages, shipping, payment processing fees, rent, utilities, advertising, software subscriptions, and any other expense tied to the sale. Be consistent about which costs you include, because the margin is only as honest as the numbers behind it.
Pro tip: run the calculator several times with different numbers to compare scenarios. Try your current figures, then try a 10 percent price increase, then try a 10 percent cost reduction. You will quickly see which lever moves your margin the most, and that insight is worth more than any single calculation.
Profit margin is the share of revenue that remains as profit after costs are subtracted, expressed as a percentage. If a business brings in $100,000 of revenue and spends $60,000 on costs, its profit is $40,000 and its profit margin is 40 percent. That single number tells you how much of every dollar earned the business actually keeps, which is why lenders, investors, and owners watch it so closely. A business can grow revenue every year and still be in trouble if its margin keeps shrinking, because shrinking margins mean each new dollar of sales is worth less than the last.
Accountants usually talk about three layers of margin. Gross margin looks only at the direct cost of producing what was sold: materials and direct labor, known together as the cost of goods sold. Operating margin goes further and subtracts rent, salaries, marketing, insurance, and other day-to-day operating expenses. Net margin subtracts everything, including interest and taxes, and shows the final profit kept on each dollar of revenue. The calculator on this page computes a gross-style margin from the revenue and cost figures you enter, so if you include all operating expenses in the cost field, your result will look more like an operating margin.
Profit margin matters for three practical reasons. First, it guides pricing: if you know your target margin, you can work backward to the selling price you need. Second, it enables fair comparisons: a $40,000 profit means something very different on $100,000 of revenue than on $1,000,000, and the margin percentage puts both on the same scale. Third, it reveals trends: a margin that falls from 40 percent to 30 percent over two years signals rising costs or weakening prices long before total profit turns negative.
Do not confuse margin with markup, its close cousin. Markup is profit expressed as a percentage of cost, while margin is profit expressed as a percentage of revenue. A product that costs $60 and sells for $100 carries $40 of profit. The margin is $40 divided by $100, which is 40 percent. The markup is $40 divided by $60, which is 66.67 percent. Margin can never exceed 100 percent, but markup can, which is one reason the two get mixed up.
Finally, remember that margin is a rate, not an amount. A 60 percent margin on $10,000 of revenue produces $6,000 of profit, while a 15 percent margin on $500,000 of revenue produces $75,000. High margins feel good, but total profit pays the bills, so always read the margin together with the dollar figures behind it.
The math behind the calculator uses two short formulas. First, profit is revenue minus costs. Second, the margin percentage is profit divided by revenue, multiplied by 100:
Profit = Revenue − Costs
Profit Margin (%) = (Revenue − Costs) ÷ Revenue × 100
Worked example 1. A bakery earns $100,000 in annual revenue and spends $60,000 on ingredients, wages, rent, and utilities. Profit equals $100,000 − $60,000 = $40,000. The margin equals $40,000 ÷ $100,000 × 100 = 40%. The bakery keeps 40 cents of every dollar it earns, which is a healthy result for a food business where ingredient and labor costs run high.
Worked example 2. A consulting firm bills $250,000 in a year and pays $212,500 in contractor fees, software, insurance, and office costs. Profit equals $250,000 − $212,500 = $37,500. The margin equals $37,500 ÷ $250,000 × 100 = 15%. Notice that the firm earns almost the same dollar profit as the bakery ($37,500 versus $40,000) but keeps only 15 cents of each dollar of revenue. This comparison shows why the percentage matters: the two businesses look similar in dollars and very different in efficiency.
The key takeaway from both examples is that the formula never changes, only the inputs do. Plug any revenue and cost figures into the same two steps and you get a margin you can compare across products, months, or entire businesses.
Example 1: the freelance designer. Maya is a freelance graphic designer. Last year she billed clients $120,000. Her costs were $18,000 for software, subcontractors, and home-office expenses, plus $12,000 for marketing and professional insurance, for $30,000 in total costs. Her profit is $120,000 − $30,000 = $90,000, and her margin is $90,000 ÷ $120,000 × 100 = 75%. That high margin is normal for services, where the main input is skilled time rather than physical materials. When Maya considers raising her rates by 10 percent, she runs the numbers first: $132,000 of revenue against the same $30,000 of costs gives a margin of 77.27 percent, so she can see exactly what the increase is worth before she quotes a single client.
Example 2: the online store. GreenLeaf, a small online store, sold $500,000 of goods in a year. It spent $300,000 on inventory, $75,000 on shipping and packaging, and $50,000 on advertising and marketplace fees, for $425,000 in total costs. Profit equals $500,000 − $425,000 = $75,000, and the margin equals $75,000 ÷ $500,000 × 100 = 15%. Retail margins are thinner because every sale carries product and delivery costs. When GreenLeaf negotiates its shipping contract down by $15,000, costs fall to $410,000, profit rises to $90,000, and the margin climbs to 18%. A single cost saving, tested in the calculator, reveals a three-point margin improvement that would be hard to spot in a spreadsheet of totals.
Keep exploring the numbers behind your business with these free tools from Sigma Calculator:
This page provides a Profit Margin Calculator. Inputs: revenue in dollars (default 100000) and costs in dollars (default 60000). Outputs: gross profit equals revenue minus costs; profit margin percent equals (revenue minus costs) divided by revenue multiplied by 100, shown with two decimals; the margin displays as an em dash when revenue is zero. The calculator runs in the browser with JavaScript and stores no data. Key definitions: profit margin is profit divided by revenue; markup is profit divided by cost; gross margin uses cost of goods sold while net margin uses all expenses. Page language: English. Intended audience: small business owners, freelancers, students, and shoppers comparing prices. Last updated: October 8, 2026.
A profit margin calculator is a free online tool that turns two numbers, your revenue and your costs, into your gross profit and your profit margin percentage. Instead of doing the subtraction and division by hand, you type in the figures and get an instant answer, which makes it easy to test different prices and cost levels.
Subtract costs from revenue to get profit, divide profit by revenue, then multiply by 100. For example, $100,000 of revenue minus $60,000 of costs leaves $40,000 of profit, and $40,000 divided by $100,000 is 0.40, which is a 40 percent margin.
Margin is profit as a percentage of revenue, which is the selling price. Markup is profit as a percentage of cost. A product that costs $60 and sells for $100 carries $40 of profit, a 40 percent margin ($40 divided by $100), and a 66.67 percent markup ($40 divided by $60). The two numbers are never the same except at zero profit.
It depends on the industry. Service businesses and software companies often earn margins above 50 percent, while grocery stores and high-volume retailers can thrive on margins under 5 percent. Compare your margin with businesses of similar size in your own industry rather than chasing a universal target, and track whether your margin is rising or falling over time.
Yes. If costs are higher than revenue, profit is negative and so is the margin. A negative 10 percent margin means the business loses 10 cents on every dollar of revenue. A negative margin is a warning sign: either raise prices, cut costs, or do both.
Gross margin subtracts only the direct cost of goods sold from revenue, while net margin subtracts every expense, including operating costs, interest, and taxes. Gross margin shows how efficiently you produce what you sell; net margin shows what the business finally keeps.
Use the formula: price equals cost divided by (1 minus target margin). For a 40 percent target margin on a product costing $60, the price is $60 divided by 0.60, which is $100. Try the Margin Calculator linked above to solve for price, cost, or margin automatically.
Accountants may allocate costs differently, for example by including depreciation, owner salaries, or overhead that you left out, or by using accrual accounting instead of cash figures. Use the same cost definitions each time you compare periods, and ask your accountant which expenses are included in their margin figure.
Sources: standard accounting references, including generally accepted accounting principles (GAAP) guidance on revenue and expense recognition, and widely used small-business pricing literature.
Last updated: October 8, 2026.