Updated July 25, 2023
Gross Margin Formula (Table of Contents)
What is the Gross Margin Formula?
The term “Gross Margin” refers to the profitability measure that assesses whether or not a company can run its operation efficiently and generate enough profit. Basically, gross margin determines the profitability after adjusting the costs of production that can be directly assigned to the manufacturing process.
Such directly assignable costs primarily include raw material cost, direct labor expense, and manufacturing overhead, and are they collectively known as the cost of goods sold or cost of sales? Some companies report a gross profit as a line item in the income statement.
The formula for gross margin is very simple and can be derived by dividing the difference between the net sales and the cost of goods sold by the net sales, which is then expressed in percentage by multiplying by 100%.
Mathematically, it represents as:
The formula for Gross Margin Formula:
Example of Gross Margin Formula (With Excel Template)
Let’s take an example to see the calculation of Gross Margin better.
Example #1
Let us take the example of ASD GmbH CO KG to illustrate the computation of gross margin. The company is based in Germany, and it manufactures corrugated boxes that are supplied to parts of the country. According to its annual report for the year 2018, the company successfully clocked net sales of €27.8 million during the year. Calculate the company’s gross margin if the following cost breakup is available.
Solution:
The Cost of Goods Sold is calculated using the formula given below
Cost of Goods Sold = Raw Materials Cost + Direct Labor Cost + Factory Rental Expense
 Cost of Goods Sold = €9.50 million + €6.50 million + €1.20 million
 Cost of Goods Sold = €17.20 million
Gross Margin calculates using the formula given below
Gross Margin = (Net Sales – Cost of Goods Sold) / Net Sales * 100
 Gross Margin = (€27.80 million – €17.20 million) / €27.80 million * 100%
 Gross Margin = 38.13%
Therefore, the Company’s Gross Margin was 38.13% in 2018.
Example #2
Let us take the example of Samsung to illustrate the computation of gross margin for a reallife company. The recent annual report states that the company achieved revenue of $221.57 billion in 2018 visàvis $217.75 billion in 2017. On the other hand, the corresponding cost of sales was $120.34 billion in 2018 visàvis $117.51 billion in 2017. Calculate the gross margin of the company for the years 2017 and 2018.
Solution:
Gross Margin calculates using the formula given below:
Gross Margin = (Revenue – Cost of Goods Sold) / Revenue * 100
For the Year 2017
 Gross Margin = ($217.75 billion – $117.51 billion) / $217.75 billion * 100
 Gross Margin = 46.03%
For the Year 2018
 Gross Margin = ($221.57 billion – $120.34 billion) / $221.57 billion * 100
 Gross Margin = 45.69%
Therefore, Samsung’s Gross Margin declined slightly from 46.03% in 2017 to 45.69% in 2018.
Example #3
Let us take the example of Walmart Inc. for the computation of gross margin. According to the annual report for the year 2018, the company achieved net sales of $495.76 billion and incurred the corresponding cost of sales of $373.40 billion. Calculate the gross margin of the company for the year 2018.
Solution:
Gross Margin calculates using the formula given below:
Gross Margin = (Revenue – Cost of Goods Sold) / Revenue * 100
 Gross Margin = ($495.76 billion – $373.40 billion) / $495.76 billion * 100%
 Gross Margin = 24.68%
Therefore, Walmart Inc.’s Gross Margin for the year 2018 was 24.68%.
Explanation
The formula for Gross Margin calculates by using the following steps:
Step 1: First, figure out the net sales, usually the first line item in a company’s income statement.
Step 2: Next, figure out the cost of goods sold or the cost of sales from the income statement. It is either available as a line item or has to compute by adding up all the costs of production that directly assigns to production.
Step 3: Next, calculate the gross profit by deducting the cost of goods sold (step 2) from the net sales (step 1).
Step 4: Finally, the formula for gross margin derives by dividing the gross profit (step 3) by the net sales (step 1) and multiplying by 100%, as shown below.
Gross Margin = (Net Sales – Cost of Goods Sold) / Net Sales * 100
Relevance and Use
It is important to understand the concept of gross margin because it helps a company’s management better assess its operational efficiency and profitability in a general sense. But judging what can be considered a healthy gross margin is very difficult. Inherently, analysts use the margins of industry peers as a benchmark to assess the gross margin, and they consider any company performing better than that benchmark as good.
Gross Margin Formula Calculator
You can use the following Gross Margin Formula Calculator
Net Sales  
Cost of Goods Sold  
Gross Margin  
Gross Margin  = 


= 

Recommended Articles
This is a guide to Gross Margin Formula. Here we discuss calculating the gross margin formula and practical examples. We also provide a gross margin calculator with a downloadable Excel template. You may also look at the following articles to learn more –