Free Gross Margin Calculator (With Formula)
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.
Gross Profit—
Gross Margin—
Equivalent Markup—
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.