List of everythingthing that goes into gross margin calculation
Use this premium calculator to estimate revenue, total cost of goods sold, gross profit, gross margin, markup, and cost mix. Then review the expert guide below to understand exactly what belongs in a gross margin calculation and what should stay out.
Interactive Calculator
Results Summary
Enter your figures and click Calculate gross margin to see your net revenue, cost of goods sold, gross profit, gross margin percentage, and a visual breakdown.
Revenue vs COGS vs Gross Profit
What is included in a gross margin calculation?
If you are searching for a practical list of everythingthing that goes into gross margin calculation, the core idea is simple: gross margin measures how much money remains after subtracting the direct costs of producing or purchasing what you sold. It is one of the clearest indicators of pricing strength, production efficiency, sourcing discipline, and product mix quality. However, many businesses blur the line between direct costs and operating expenses, which can make the metric inconsistent and less useful for decision making.
At a high level, the formula is:
Gross Margin = (Net Revenue – Cost of Goods Sold) / Net Revenue
To use that formula correctly, you must define both net revenue and cost of goods sold with discipline. Net revenue usually starts with sales and then subtracts returns, allowances, and sometimes discounts depending on your accounting policy. Cost of goods sold, often called COGS, includes the direct costs necessary to acquire, manufacture, or deliver the product or service that generated the revenue.
Core items that typically go into gross margin
- Sales revenue: The amount billed or collected from customers before reductions.
- Sales returns and allowances: These reduce gross sales to net sales or net revenue.
- Beginning inventory: For businesses that carry inventory, this is the value of inventory available at the start of the period.
- Purchases or direct materials: Materials or finished goods acquired during the period for resale or production.
- Inbound freight: Transportation, customs, or delivery charges incurred to bring inventory or raw materials to your location.
- Direct labor: Wages and payroll costs for employees whose work directly creates the goods sold or fulfills the service sold.
- Manufacturing overhead: Production-related indirect costs such as factory supplies, equipment depreciation allocated to production, quality control, and plant utilities.
- Ending inventory: Subtracted from goods available for sale to arrive at COGS.
What should usually stay out of gross margin?
Gross margin becomes more powerful when it stays focused on direct economics. Many teams accidentally include operating expenses that belong below gross profit. When that happens, gross margin starts to resemble operating margin, and trend analysis becomes noisy. The following items are usually excluded from a standard gross margin calculation unless your accounting framework or industry conventions say otherwise:
- General administrative salaries
- Marketing and advertising spend
- Sales commissions not treated as direct cost under your policy
- Corporate office rent
- Finance costs and interest expense
- Income taxes
- Research and development
- Executive compensation not directly tied to production or delivery
- Software subscriptions for back-office administration
That said, there are exceptions. For example, merchant processing fees can be treated by some ecommerce operators as direct transaction costs, and content delivery costs may be considered direct costs in a digital product business. Consistency matters more than perfection. Once you choose a defensible policy, apply it the same way each period.
Step by step list of everythingthing that goes into gross margin calculation
- Start with gross sales. Add up all product or service sales for the reporting period.
- Subtract returns, allowances, and approved discounts. This gives you net revenue.
- Determine beginning inventory. Use the inventory balance at the start of the month, quarter, or year.
- Add purchases and direct materials. Include inventory bought for resale or materials used in production.
- Add inbound freight and landed costs. Include shipping, customs, duties, and receiving costs if capitalized or treated as direct inventory costs.
- Add direct labor. Include only labor directly involved in making or delivering the sold output.
- Add manufacturing or service delivery overhead. Include only overhead allocated to production or service fulfillment.
- Subtract ending inventory. This removes the cost of inventory not yet sold.
- Calculate COGS. The result is your cost of goods sold for the period.
- Calculate gross profit. Gross profit equals net revenue minus COGS.
- Calculate gross margin percentage. Divide gross profit by net revenue and multiply by 100.
- Compare with prior periods and peers. Gross margin only becomes truly useful when benchmarked over time or against your market.
Industry comparison data
Gross margin varies widely by business model. A grocery chain has very different economics from an enterprise software company. The table below provides broad reference ranges that many analysts and operators use for directional benchmarking. These figures are illustrative market norms gathered from public company patterns and sector reporting, not guaranteed targets for every business.
| Industry | Typical gross margin range | Why the range differs |
|---|---|---|
| Grocery retail | 20% to 30% | High inventory turnover, price competition, perishable goods, and limited pricing power keep margins tight. |
| Apparel retail | 45% to 60% | Brand value and markup can be strong, but markdowns and returns affect results. |
| Manufacturing | 25% to 40% | Material costs, labor efficiency, waste, and factory utilization all shape margin. |
| Restaurants | 60% to 75% | Food and beverage input costs are direct, but labor treatment can vary by reporting practice. |
| Software / SaaS | 70% to 85% | Incremental delivery costs are often low once the platform is built, though hosting and support matter. |
Another useful way to evaluate gross margin is to compare cost structure components. If one component starts rising faster than revenue, the business can lose margin even if sales appear healthy.
| Cost component | Healthy directional sign | Warning sign |
|---|---|---|
| Direct materials | Stable percentage of sales or improving through purchasing leverage | Rapid inflation without price increases or supplier concentration risk |
| Direct labor | Improvement through productivity, training, or automation | Overtime spikes, poor scheduling, rework, or low utilization |
| Inbound freight | Better routing, freight contracts, and consolidated shipments | Expedited shipping, volatile fuel costs, customs delays |
| Overhead allocation | Higher plant utilization and less waste | Underused capacity, scrap, downtime, and maintenance shocks |
| Returns and allowances | Low defect rates and strong customer fit | Quality issues, poor descriptions, sizing problems, or warranty failures |
How gross margin differs from markup
One of the most common mistakes is mixing up gross margin and markup. They are related, but they are not the same. Gross margin is calculated as gross profit divided by revenue. Markup is calculated as gross profit divided by cost. A product that costs $60 and sells for $100 has a gross profit of $40. Its gross margin is 40%, but its markup is 66.7%. If your pricing team talks in markup and your finance team talks in margin, make sure everyone understands the conversion.
Quick example
- Revenue: $100
- COGS: $60
- Gross profit: $40
- Gross margin: 40%
- Markup: 66.7%
Special cases by business type
Retail and ecommerce
Retailers usually include product purchase cost, freight-in, import duties, and packaging that is essential to preparing inventory for sale. A frequent judgment call involves payment processor fees and outbound shipping subsidies. Some operators place them below gross profit as selling expenses, while others include them as direct costs when they are tightly linked to each sale. Whatever you choose, be consistent.
Manufacturing
Manufacturers often use the most detailed gross margin model. Direct materials, direct labor, and factory overhead are standard. Overhead allocation can include production supervision, plant depreciation, maintenance, and quality assurance if these costs are directly related to producing inventory. The challenge is avoiding over-allocation of purely administrative plant costs that belong in operating expenses.
Software and SaaS
SaaS businesses usually do not have inventory in the traditional sense, but they still have direct costs. Hosting, third-party infrastructure, customer support personnel directly serving paying users, implementation labor, and software royalties can all influence gross margin. Sales and marketing, general corporate payroll, and product development generally remain outside gross margin.
Professional services
For service firms, direct labor is usually the single most important component. Billable staff compensation, payroll taxes, and benefits directly tied to service delivery may be included in cost of services. Non-billable management time, general administration, and business development costs typically stay below gross profit.
Why benchmarking matters
Gross margin by itself is not enough. A 35% margin can be excellent in one sector and weak in another. You should compare your results to historical trends, budget, product line performance, and industry peers. Public company annual reports, sector studies, and government economic releases can provide useful reference points. For broader context on business statistics and industry patterns, see the U.S. Census Bureau at census.gov, the U.S. Bureau of Labor Statistics at bls.gov, and educational accounting guidance from the University of Minnesota library resources at umn.edu.
Common mistakes that distort gross margin
- Including operating expenses in COGS: This makes gross margin look worse than it really is.
- Forgetting returns and allowances: Revenue gets overstated and margin appears inflated.
- Ignoring inventory changes: Using purchases alone instead of COGS can distort results significantly.
- Inconsistent cost treatment: If fees move in and out of COGS each month, trend analysis becomes unreliable.
- Overlooking waste and shrink: Production scrap, spoilage, or theft may materially affect direct costs.
- Mixing cash basis and accrual concepts: Gross margin should align with the accounting basis used in your statements.
How to improve gross margin
Once you have a clean list of everythingthing that goes into gross margin calculation, you can focus on the levers that move it. Better purchasing contracts, reduced freight costs, improved labor productivity, less scrap and rework, smarter price increases, stronger product mix, and better return-rate control can all lift margin. In many cases, small operational improvements create larger margin gains than headline revenue growth.
Practical improvement checklist
- Review supplier terms quarterly and negotiate on volume, lead time, and rebates.
- Measure landed cost, not just invoice price.
- Track direct labor efficiency by unit, batch, or billable hour.
- Audit return reasons and fix root causes.
- Compare gross margin by product line, channel, and customer segment.
- Separate promotional discounting from permanent pricing weakness.
- Standardize your accounting policy for direct versus indirect costs.
Final takeaway
The best answer to the phrase list of everythingthing that goes into gross margin calculation is this: include net revenue on top, then subtract only the direct costs required to create, acquire, or deliver what was sold. For inventory businesses, that usually means beginning inventory, purchases, freight-in, direct labor, production overhead, and ending inventory adjustments. For service and digital businesses, it means the direct delivery costs that scale with fulfilling revenue. Keep marketing, administration, financing, and taxes out of the calculation unless industry rules or accounting standards clearly place them inside. With a consistent framework, gross margin becomes one of the most useful metrics in finance and operations.