Gross Margin

Gross margin is the percentage of revenue left after the cost of goods sold, showing how profitably a company produces and sells what it offers.

What is gross margin?

Gross margin is the percentage of revenue a company keeps after covering the direct cost of producing its goods or services. It isolates production profitability from operating costs, taxes, and financing, which is why finance teams use it to compare products, track pricing power, and watch cost trends over time. A widening gross margin signals pricing strength or falling input costs; a narrowing one is an early warning.

How to calculate gross margin

Gross Margin % = (Revenue – COGS) / Revenue

Worked example:

  • Revenue: $5,000,000
  • Cost of goods sold: $3,000,000
  • Gross profit: $2,000,000
  • Gross margin: 2,000,000 / 5,000,000 = 40%

Gross profit is the dollar figure ($2M). Gross margin is the ratio (40%). Both come from the same two inputs, so both are only as accurate as how cleanly revenue and cost are mapped.

Gross margin in Power BI (DAX)

The exact measure depends on your data model. Replace the table and column names with the ones in your model:

Total Revenue = SUM ( Sales[Revenue] )
Total COGS    = SUM ( Sales[COGS] )
Gross Margin % = DIVIDE ( [Total Revenue] - [Total COGS], [Total Revenue] )

DIVIDE returns a blank instead of an error when revenue is zero. Format the measure as a percentage.

What is a good gross margin?

A healthy gross margin depends on the industry. Software and services run high because the direct cost of delivery is low; distribution, manufacturing, and construction run lower because materials and labor sit inside the cost of goods sold. The number worth watching is the trend. A margin sliding quarter over quarter usually points to rising input costs or pricing pressure, well before it reaches net income.

Gross margin vs net margin

Gross margin stops at direct production cost. Net margin subtracts everything else, including operating expense, interest, and taxes, so it is always lower. Use gross margin to judge how profitably you produce, and net margin to judge what reaches the bottom line. For the broader practice of analyzing margins across products and periods, see Yield / Margin Analysis.

Common gross margin reporting pitfalls

Gross margin breaks when cost is allocated inconsistently, when revenue and cost of goods sold are pulled from different periods, or when each system calculates it its own way. In environments with more than one ERP, the same product can carry a different cost in the ERP, the warehouse, and the BI report, so the margin depends on which source someone trusted.

Reporting gross margin from your ERP data

Gross margin is only as reliable as the ledger and cost data feeding it. When revenue and cost of goods sold live in separate ERP modules, or across systems after an acquisition, a governed data foundation maps them once so every report reads the same number. QuickLaunch ships pre-built models for JD Edwards, Vista, NetSuite, and OneStream that surface revenue, cost, and margin from source data without hand-built spreadsheets.

Frequently Asked Questions

How is gross margin calculated?

Subtract the cost of goods sold from revenue, then divide by revenue. A company with $5M revenue and $3M cost of goods sold has a 40% gross margin.

What is the difference between gross margin and gross profit?

Gross profit is the dollar amount left after cost of goods sold; gross margin is that amount as a percentage of revenue.

What is a good gross margin?

It varies by industry. Software runs high, distribution and construction run lower. The trend over time matters more than the absolute number.

Related QuickLaunch Solutions and Products

Foundation Pack

Accelerate time to insight while lowering total cost of ownership by creating a unified and centralized business foundation with your CRM, ERP, and other data sources.

Key Features

  • Automated Data Pipelines & Replication
  • Modern Data Lakehouse Architecture
  • Pre-Built, Enterprise-Grade Data Models
  • Advanced Analytics Capabilities
Learn More About NetSuite Analytics

JDE Pack

Unlock finance, supply chain, manufacturing, job cost, and payroll insights from EnterpriseOne with pre-built ERP analytics.

Key Features

  • 29 perspectives
  • 3,000+ measures
  • 200+ relationships
  • Automatic Julian date conversion
  • User-defined code translation 
Learn More About JD Edwards Analytics

Vista Pack

Purpose-built analytics for construction project intelligence, job costing, and operational performance.

Key Features

  • 11 perspectives
  • 1900+ measures
  • Specialized job costing
  • Earned revenue calculations 
  • WIP & retention tracking 
Learn More About Vista Analytics

NetSuite Pack

Gain clarity on core financials (GL, AP, AR) with streamlined multi-calendar financial reporting and cloud ERP analytics.

Key Features

  • 3 perspectives
  • 600+ measures
  • 40+ relationships
  • Multi-subsidiary consolidation 
  • SuiteAnalytics integration 
Learn More About NetSuite Analytics

OneStream Pack

Financial planning, reporting, and consolidation analytics integrated with OneStream's Partner Place marketplace. 

Key Features

  • 500+ dimensions
  • 900+ measures
  • 25+ relationships
  • FP&A integration
  • Consolidation workflows
Learn More About OneStream Analytics

Get Your Custom Analytics Blueprint

Let us show you exactly how our unified platform can meet your specific goals in a personalized live demo.

Get Custom Demo