What Is Gross Margin?

What is gross margin? It is the percentage of revenue remaining after subtracting the direct cost of producing goods or services. A company with $1M revenue and $600K in COGS has a 40% figure.

Calculate this metric from a revenue and COGS spreadsheet in one step, broken down by product line or region

What this export contains

Date
Revenue
COGS
Gross Profit
Product Line
Region
SKU
Units Sold
Unit Cost
Return Amount

What usually goes wrong with it

  • Revenue and COGS live in different reports

    Income statement exports from QuickBooks or Xero often split revenue by product line and COGS by vendor, requiring a manual join before the calculation is possible by product.

    DataMimi Datamimi joins revenue and COGS columns from the same export and calculates the metric by product line, region, or SKU without a manual VLOOKUP step.

  • COGS definitions vary by accounting method

    FIFO and LIFO inventory accounting produce different COGS figures for the same period, making comparisons across companies or periods misleading without knowing the method used.

    DataMimi It labels the COGS column source so you can note which accounting method the file uses before drawing period-over-period conclusions.

  • Segment breakdown isn't visible in summary financials

    A consolidated P&L shows one number. Identifying which product lines or geographies drag the overall figure down requires row-level analysis of the underlying export.

    DataMimi Datamimi breaks the summary figure into segment rows, showing which product lines or regions pull the overall number down.

Common questions

What is gross margin as a formula?

(Revenue − COGS) ÷ Revenue × 100. If revenue is $500,000 and COGS is $300,000, the result is 40%.

What is a good gross margin percentage?

Benchmarks vary significantly: SaaS companies typically run 70–80%, retailers 25–50%, and manufacturers 20–40%. Comparing within the same industry and business model gives the most meaningful signal.

What is gross margin vs net margin?

The gross figure subtracts only direct production costs (COGS). Net margin subtracts all expenses including operating costs, interest, and taxes. A company can have a strong gross figure but a weak net figure if overhead is high.

How do I calculate gross margin by product in a spreadsheet?

Add a helper column: =(Revenue−COGS)/Revenue. Then pivot by product line with that column as the value field, set to average. Or upload the file to Datamimi and ask 'margin by product line.'

What does Datamimi cost?

Free: $0/month, 40 credits, no credit card required. Lite: $9/month, 400 credits. Starter: $24/month, 1,500 credits, up to 3 simultaneous files. Pro: $59/month, 5,000 credits with rollover. Team: $199/month, 20,000 credits, 5 users.

Try it with your own file

DataMimi reads the file you actually have — merged cells, headers below row one, totals pasted at the bottom — and shows which rows and columns every number came from.

Ask about your file

More in AI spreadsheet analysis