Sales Calculator
Enter any two values (cost, revenue, profit, margin, or markup) and this calculator solves the rest instantly. Switch to Net Sales mode to subtract returns, allowances, and discounts from gross sales. A step-by-step panel shows the math, and a breakdown donut visualises how revenue splits between cost and profit.
What is gross profit, gross margin, and markup?
Gross profit is the simplest measure of a sale's profitability: it is the selling price minus the direct cost of the product or service. Gross margin expresses that profit as a percentage of revenue, so a gross margin of 40% means 40 cents of every dollar of revenue is profit before operating expenses. Markup is the same gross profit expressed as a percentage of cost instead of revenue. Because the denominator differs, markup is always a larger number than gross margin for the same sale. For example, a product that costs 60 and sells for 100 has a 40% gross margin but a 66.7% markup.
Gross sales vs. net sales
Gross sales is the total revenue figure before any deductions. Net sales is what remains after subtracting sales returns (goods sent back by customers), sales allowances (price concessions for damaged or inferior goods), and sales discounts (reductions offered for early payment, such as "2/10 net 30" terms). Net sales is the revenue figure that appears at the top of a formal income statement. Tracking the gap between gross and net sales helps businesses spot rising return rates or overly generous discount policies before they erode profitability.
How to use the sales margin formula
The core formulas are: Gross Profit = Revenue - Cost, Gross Margin (%) = (Gross Profit / Revenue) x 100, and Markup (%) = (Gross Profit / Cost) x 100. If you know any two of the five variables (cost, revenue, gross profit, gross margin, markup) you can derive the other three through simple algebra. For instance, if you know your cost is 60 and your target gross margin is 40%, rearrange to get: Revenue = Cost / (1 - Margin) = 60 / 0.60 = 100. That relationship between markup and margin trips up many new business owners: a 40% markup does not equal a 40% margin.
Gross margin vs. net profit margin
Gross margin only accounts for the direct cost of goods sold. Net profit margin subtracts operating expenses (salaries, rent, utilities, marketing), interest, and taxes from gross profit, then divides by revenue. A business can have a strong 60% gross margin and still lose money if its operating costs are high. For a fuller picture of profitability, always pair gross margin analysis with an estimate of fixed and variable overhead. The referenceTable above shows typical gross margin benchmarks by industry, which you can use as a starting point for evaluating your own result.
Typical gross margin ranges by industry
| Industry | Typical gross margin | Notes |
|---|---|---|
| Software / SaaS | 70-90% | Low cost of goods, high margin norm |
| Financial services | 50-85% | Varies by product and regulatory cost |
| Healthcare / pharma | 40-75% | R&D and compliance costs vary widely |
| Retail (apparel) | 40-60% | Depends on brand premium |
| Consumer electronics | 25-40% | Apple ~40%, commodity brands 15-20% |
| Grocery / food retail | 20-35% | High volume, low per-unit margin |
| Construction | 15-25% | Material-intensive, tight margins |
| Automotive | 10-20% | Capital-heavy, competitive pricing |
| Restaurant / food service | 3-10% | After food and labour costs |
Gross margin varies widely by sector. Use these ranges as benchmarks when evaluating your own result.
Frequently asked questions
What is the difference between markup and margin?
Markup is gross profit divided by cost, while margin is gross profit divided by revenue (selling price). Because cost is always lower than revenue, markup is always a larger percentage than margin for the same product. For example, buying at 60 and selling at 100 gives a 40% gross margin but a 66.7% markup. Confusing the two is a common pricing mistake that causes businesses to underprice their products.
How do I calculate gross profit?
Gross profit = Revenue - Cost. If you sell a product for 100 and it cost you 60 to produce or purchase, gross profit is 40 per unit. Multiply by units sold to get total gross profit for the period. This figure does not yet account for operating expenses such as rent, wages, or marketing, which are deducted later to arrive at net operating profit.
What is a good gross margin?
It depends heavily on the industry. Software companies routinely achieve 70-90% gross margins because their marginal cost of an extra customer is near zero. Grocery retailers typically run 20-35% margins and rely on high volume. A 40-60% gross margin is considered healthy in many product businesses, but the key test is whether the margin is wide enough to cover operating expenses and still leave a net profit.
What are sales returns, allowances, and discounts?
Sales returns are refunds for goods returned by customers. Sales allowances are price reductions granted after the original sale, typically for goods delivered in a damaged or inferior condition. Sales discounts are incentives for early payment, such as offering a 2% discount if an invoice is paid within 10 days instead of the standard 30-day term (written as "2/10 net 30"). All three reduce gross sales to arrive at net sales on the income statement.
How do I convert a markup percentage to a margin percentage?
Use the formula: Margin (%) = Markup (%) / (1 + Markup %). For example, a 66.7% markup converts to 66.7 / (1 + 0.667) = 66.7 / 1.667 = 40% margin. Conversely, to go from margin to markup: Markup (%) = Margin (%) / (1 - Margin %). So a 40% margin gives 40 / (1 - 0.40) = 40 / 0.60 = 66.7% markup.
What is the formula for net sales?
Net Sales = Gross Sales - Sales Returns - Sales Allowances - Sales Discounts. Gross sales is your total billed revenue before any corrections. The three deduction categories capture goods sent back, price concessions after the fact, and early-payment incentives. Net sales is the revenue line on a formal income statement and is the starting point for calculating gross profit when cost of goods sold is available.