When working in finance, you will come across many different types of “margin”. At its core, a margin is a fairly simple calculation, where you subtract expenses from revenue to get at a company’s profits. However, there are many different types of margins that are calculated differently—and you should have a basic understanding of how they are different.

Profit Margin or Net Margin

The simplest margin to calculate is called “profit margin” or “net margin” and is very easy to calculate. You divide the net profit by a firm’s revenue to get at the company’s profit margin.

For instance, let’s say a company sells $100 worth of goods. The company spent $97 on the goods and the various expenses needed to sell those goods, leading to net income of $3 (i.e., income after costs). That is a 3% margin, since 3/100 = 3%.

Gross Profit Margin

In reality, costs are a lot more complicated to calculate. If I buy $90 worth of goods and sell them for $100, I will likely have more expenses. I need to hire people to sell, I need space to store my goods, I need to spend on marketing, and so on.

The “gross margin” or “gross profit margin” is an attempt to calculate how much a firm makes by buying and reselling goods without the extra costs (particularly “fixed costs”) involved in its operation. To calculate this, we need to determine revenue and the cost of goods sold (COGS).

Let’s run with the same example. The firm buys $90 worth of goods and sells those goods for $100. The gross profit margin would be 10%. However, let’s also assume that the firm also needs to spend $7 per $100 worth of goods for other expenses. Those expenses are not calculated in the gross profit margin, which is why this metric has limited use.

Most public firms will report COGS in addition to revenue, making this metric easy to calculate in many cases.

Operating Margin

A much more useful metric that is frequently used is the “operating margin”. To get this we need to divide net sales by operating income. To understand this, we first need to define these two terms.

Net sales is the total value of all revenue minus returned goods and allowances for problems with products. Sometimes there’s theft, lost goods in transport, and so on. We need to figure these expenses into our total revenue figure, which gives us net sales.

We then need to understand operating income. This is when we subtract from revenue the various costs of production—those $7 in the example above used for marketing, storage, wages, and so on.

Let’s say $1 per $100 is lost due to theft and other issues in the business exemplified above. We’re now dealing with $99 in net sales and $3 in operating income. That’s an operating margin of 3.03%.

EBITDA

A final margin calculation frequently used is “EBITDA”, or earnings before interest, tax, depreciation, and amortization.  This is often used to determine the sustainability of a company’s performance while ignoring issues often beyond the company’s control. Firms can’t usually change their tax burden much, and depreciation and amortization are often fixed costs with little leeway for firms to change. We can ignore those things by calculating earnings without those costs.

The calculation for this is quite simple despite the cumbersome name. One adds up net income, depreciation, amortization, taxes, and interest expenses.

For instance, let’s say that $1 per $100 of goods sold in the expenses discussed above are the result of amortization and interest. Let’s also say $5 are due to taxes and another $3 are interest payments on loans. In this case our formula is:

EBITDA = $3 + $1 + $5 + $3 = $12.

Our EBITDA margin becomes 12% (12/100).

How to Use These

In reality, calculating these margins are quite simple, but their use will vary tremendously. EBITDA is often used for fast-growing companies here a lot of debt can obscure true margins that will appear as the firm grows. Gross profit margins are useful when discussing ill-managed or distressed firms that could have better profitability if restructured. And operating margins show how the firm is currently operating right now with no changes.

No margin calculation is superior. All have their place and use. But analysts need to be familiar with these and be able to calculate them whenever determining the value of an investment.