Margin Leakage & Profitability

Free Gross Margin Calculator (With Formula)

Gross margin calculator showing revenue and cost inputs with instant results

Enter revenue and cost of goods sold below, and this calculator returns gross profit, gross margin percentage, and the equivalent markup, instantly, with no spreadsheet required.

This calculator runs entirely in your browser. Nothing you enter is sent anywhere or stored.

How to Use This Calculator

Enter total revenue for the period, job, or product being measured, then enter the cost of goods sold for that same period, job, or product. COGS should include only the direct costs tied to producing or delivering what was sold, materials, direct labor, and directly attributable overhead. For the full breakdown of what belongs in COGS and what does not, see the section on what gross margin does and does not include in our complete guide to gross margin. The calculator returns three numbers. Gross profit is the dollar amount left after COGS. Gross margin is that amount expressed as a percentage of revenue, the number that belongs on a P&L or a KPI dashboard. Equivalent markup is the same relationship expressed against cost instead of revenue, useful for anyone building a quote from a known cost rather than reviewing results from known revenue. If margin and markup targets keep getting mixed up when pricing jobs, the conversion tables in our guide to gross margin vs. markup are worth bookmarking alongside this tool.

Worked Example

A job bills at $80,000 with $54,000 in direct costs. Entered into the calculator above: gross profit of $26,000, gross margin of 32.5%, and an equivalent markup of 48.1%. Same job, three different ways of describing the same result, each useful for a different purpose: the profit dollar figure for cash flow, the margin percentage for pricing policy and P&L review, and the markup percentage for building the next quote from a cost estimate.

Single Job vs. Blended Gross Margin

This calculator works the same way whether the inputs represent a single job, a single product line, a full month of revenue and COGS, or a full year. The formula does not change. What changes is what the resulting number actually tells you. A single job’s gross margin tells you whether that specific job was priced and executed well. A blended gross margin, calculated from total revenue and total COGS across every job in a period, tells you the average across everything sold, and averages can hide real problems. A blended 32% gross margin across fifty jobs could mean every job ran close to 32%, or it could mean forty jobs ran at 40% while ten ran at a loss, and the calculator has no way to show that difference from a single set of inputs. Running this calculator job by job, rather than only on the monthly total, is the only way to catch a specific underperforming job before it gets averaged away into a number that looks fine.

The Same Calculation in Excel or Google Sheets

For anyone who wants this built into a recurring spreadsheet rather than using the calculator above each time, the formula is one line. If revenue sits in cell B2 and COGS sits in cell C2, gross margin is =(B2-C2)/B2, formatted as a percentage. Gross profit is simply =B2-C2, and equivalent markup is =(B2-C2)/C2. Dragging these three formulas down a column of jobs turns a job list into a running margin report without needing a calculator for each line individually, which is the natural next step once tracking more than a handful of jobs at a time.

Common Mistakes That Throw Off the Calculation

The calculator only returns a number as accurate as what goes into it, and a few input mistakes come up often enough to flag directly. Entering price instead of revenue actually collected. If a job included a discount, a return, or a partial write-off, the revenue figure used should reflect what was actually billed and collected, not the original list price on the quote. Leaving out indirect but genuinely production-related costs. Freight-in on materials, or equipment depreciation directly tied to running a specific job, belongs in COGS even though it is easy to overlook when pulling numbers together quickly. Including costs that do not belong in COGS. Sales commissions, marketing spend, and general office overhead should not be entered as part of the cost figure. Including them will understate gross margin and blend it with numbers that belong further down the income statement, in operating margin instead. Mixing revenue from one period with costs from another. If costs are entered with a lag, comparing this month’s revenue against last month’s cost data produces a margin figure that does not describe any single real period of work.

Frequently Asked Questions

What is a good result from a gross margin calculator?

It depends on the industry. There is no single universal target. Software businesses often see results above 70%, while grocery retailers typically see results in the mid-20s. For a manufacturer or industrial distributor, a result in the high 20s to high 30s is common territory. The full benchmark table by industry is in our gross margin guide.

Does this calculator work for a single job or only for full financial periods?

Both. Enter the revenue and COGS for whatever period or unit you want to measure, a single job, a single product, a month, or a full year. The formula is identical at every scale.

Why does the calculator also show a markup percentage?

Because margin and markup are frequently confused when pricing jobs, and having both numbers side by side from the same inputs makes it immediately clear they are not the same figure. A 32.5% margin and a 48.1% markup describe the same $80,000 job.

Can I use this calculator if I don’t know my exact cost of goods sold?

You can, but the result is only as accurate as the cost figure entered. A rough or outdated cost estimate will produce a margin number that looks precise but is not reliable. For job-based businesses where cost data tends to drift between quoting and completion, tracking actual costs against quoted costs in real time catches that drift earlier than a one-time calculation can.

The Bottom Line

A gross margin calculator answers one question well: given a specific revenue and cost, what is the resulting margin. It is a fast, useful check on a single number. It is not, by itself, a way to see where margin is slipping across a whole book of business, which requires looking at margin job by job or customer by customer rather than one calculation at a time. If that broader picture is what’s actually needed, Quanzar’s free 10-minute margin audit runs this same math automatically across your last several jobs and flags which ones need a closer look.