How to Calculate Gross Profit and Markup Percentage in Excel

Gross profit is the amount calculated after deducting the cost of goods sold (COGS) from revenue. In other words, gross profit is the difference between revenue and COGS. The total cost of goods includes various types of expenses: production, sales, operating expenses, and many other intermediary costs. To calculate gross profit, simply subtract total COGS from total revenue.



Formula for Calculating Gross Profit Percentage

Gross profit percentage is calculated by dividing gross profit by total revenue and multiplying by 100.

Source data table:

Items20252026
Revenue $55,656 100% $65,875 100%
Cost of Goods Sold $41,454 74% $47,852 73%
Gross Profit $14,202 26% $18,023 27%
Research and Development $2,046 4% $2,466 4%
General and Administrative Expenses $6,528 12% $6,404 10%
Operating Profit $5,628 10% $9,153 14%
Interest $465 1% $467 1%
Other Income and Expenses $1,368 2% $3,197 5%
Net Profit $3,795 7% $5,489 8%

The image below shows the financial report of a certain manufacturing company:

Formula for calculating gross profit.

Gross profit is located in cell B4, and the gross profit percentage (margin) is in cell C4: =B4/$B$2

The formula for calculating gross profit simply subtracts the value in cell B3 from B2. In the formula for calculating gross profit percentage, the value in cell B4 is divided by the value in $B$2:

Formula for gross profit percentage.

Note that percentage formatting is used here – meaning there’s no need to multiply by 100. The same result can be obtained by the formula =B4/B2*100, but here the percentage formatting of cells is not used.

It is important to note that an absolute reference is set to cell $B$2, as indicated by the dollar symbols in the reference. Thanks to the absolute reference, the formula can be freely copied to other rows of the report to calculate the percentage of total revenue represented by each expense and income item. This is approximately how a surface-level analysis of a company's income and expenses is performed.

Formula for Calculating Markup Percentage in Excel

Markup is often equated with gross profit percentage, but it is something different. Markup is the percentage added to the cost of a product for profitable pricing. In other words, it is the percentage by which the price is increased to gain profit and cover costs not related to COGS. Below is an image of a sales report with markup and gross profit calculated from sales.

Markup is calculated by subtracting costs from revenue and dividing by costs. Cell B4:

=(B3-B2)/B2
Formula for calculating markup percentage.

Setting a markup of 32% gives a gross profit percentage of 24% margin. That is, as described above in the previous example =B8/B6. This time, we use the formula for margin calculation in cell B9:

=(B6-B7)/B6

To determine the markup covering the gross profit percentage of 32% (as in column D), use the following formula in cell D4:

=100%/(100%-D9)-100%
determine the markup percentage.

The above formula shows us that to achieve a gross profit of 32%, we need to set a markup of 47%, taking into account all income and expenses.

Interesting fact! The main difference between gross profit percentage and markup lies in their calculation formulas. The difference is easily noticeable in these two metrics – gross profit will never equal or exceed 100%, unlike markup. To provide clear evidence, we present a simple example where the price is multiplied by 10,000:

difference between gross profit percentage and markup.

Download examples of formulas for calculating markup and margin in Excel download file

Also read: How to Calculate Margin and Markup in Excel.

Back in the days when everything had to be done with a gray pencil on a white sheet of paper, calculation tables were already being used in accounting and financial work. Although Excel has evolved far beyond just an electronic spreadsheet, its table functions are still an indispensable tool in business. There are many formulas in Excel frequently used in accounting, finance, and other business sectors.