Given a revenue figure and a cost of goods sold figure, what is the gross profit, gross margin, COGS ratio, and markup on COGS — and how does each metric serve a different operational question?
This tool is for: E-commerce and retail operators tracking product-level profitability before operating overhead · Small-business owners pricing inventory and needing to separate product margin from overall business margin · Founders and operators who need to distinguish gross margin from net margin and markup from margin without conflating them
- Gross profit — the absolute dollar difference between revenue and cost of goods sold
- Gross margin — gross profit as a percentage of revenue, the standard product-level efficiency metric
- COGS ratio — the share of revenue consumed by cost of goods sold (the complement of gross margin)
- Markup on COGS — the percentage by which cost of goods sold was marked up to reach the selling price
Formulas Used
Gross Profit
Gross Profit = Revenue − Cost of Goods Sold
Where: Revenue = Total sales for the period or transaction (USD), Cost of Goods Sold = Direct cost of the units sold — materials, direct labor, allocated manufacturing overhead (USD)
Source: U.S. Small Business Administration — Manage Your Finances
Gross Margin
Gross Margin = (Revenue − COGS) / Revenue
Where: Revenue = Total sales for the period (USD), COGS = Cost of goods sold for the same period (USD)
Source: OpenStax — Principles of Accounting, Volume 2: Managerial Accounting
Markup on COGS
Markup on COGS = (Revenue − COGS) / COGS
Where: Revenue = Selling price for the unit or period (USD), COGS = Cost of goods sold — the denominator; undefined when COGS is zero (USD)
Source: OpenStax — Principles of Accounting, Volume 2: Managerial Accounting
Key Insight
Gross margin and markup measure the same gross profit against different denominators. A product with $400 gross profit on $1,000 revenue and $600 COGS has a 40% gross margin but a 66.67% markup. Pricing to a 50% markup target produces a 33.33% gross margin — not 50%. The gap between the two grows as margin rises: a 100% markup is a 50% gross margin, a 300% markup is a 75% gross margin. E-commerce and retail operators who conflate the two routinely misprice inventory and overstate product profitability.
Frequently Asked Questions
What is the difference between gross margin and net profit margin?
Gross margin covers only the cost of goods sold — direct materials, direct labor, and allocated manufacturing overhead for the units sold. Net profit margin subtracts all remaining expenses (operating costs, interest, taxes) from the same revenue. A business can have a healthy 45% gross margin and a slim or negative net margin if fixed overhead is large. Gross margin tells you whether the product is priced right relative to its direct cost; net margin tells you whether the entire business is profitable. This calculator computes gross margin only.
What does a negative gross margin mean?
A negative gross margin means cost of goods sold exceeds revenue — the business is selling each unit at a loss before any overhead is counted. No amount of volume or operational efficiency can compensate for a negative gross margin because the loss deepens with each unit sold. The fix is to raise the selling price, reduce direct costs, or discontinue the product. The COGS ratio output will exceed 100% in this case, confirming the problem in a different form.
Why is markup on COGS returned as null when COGS is zero?
Markup divides gross profit by cost of goods sold. When COGS is zero, the denominator is zero and the result is mathematically undefined — any markup percentage would be infinite. The calculator returns null rather than a large number to flag this clearly. Gross margin and COGS ratio remain computable in this case (100% and 0% respectively) because they divide by revenue, which is nonzero. A zero-COGS product is unusual in physical goods but can occur in digital products or services where the incremental cost of delivery is treated as zero.
About This Calculator
Sources:
- U.S. Small Business Administration — Manage Your Finances — Federal small-business guidance on revenue, cost of goods sold, and gross profit as distinct line items in small-business financial management
- OpenStax — Principles of Accounting, Volume 2: Managerial Accounting — Peer-reviewed open academic textbook (Rice University) covering gross margin, markup, COGS classification, and the distinction between gross and net margin in managerial accounting
Limitations:
- Single revenue / single COGS input — does not compute a weighted gross margin across a product mix with different cost structures
- Does not classify costs — whether an expense belongs in COGS or operating expenses is the user's responsibility; misclassification shifts the result from gross to blended margin
- Does not model taxes, returns, discounts, or payment-processing fees unless the user has incorporated them into the inputs
- Gross margin and markup are reported in percent and rounded to two decimals — high-precision accounting output may differ by a few basis points
- Null is returned for gross_margin and cogs_ratio when revenue is zero or negative, and for markup_on_cogs when COGS is zero — these are undefined cases, not errors
When to consult a professional: Before using a gross margin figure in a financial statement, investor document, lender covenant, or tax filing — an accountant can confirm whether the COGS classification matches the accounting standard used by the relevant audience
This calculator computes gross-margin figures from a revenue and cost of goods sold pair. It does not classify costs — the user is responsible for ensuring that the COGS input excludes operating expenses. The result is a planning and pricing reference, not an audited accounting output. It does not constitute business or financial advice.