You can often learn a lot from the margins -- in company financial statements. Photo: Flickr user Shaylor.

Becoming a better investor involves learning how to study companies and their financial statements. One critical concept is the profit margin, which comes in three main varieties: gross, operating, and net. Here's a quick guide to all three, along with an explanation of why they matter to your investments.

What are margins?
To arrive at profit margins, you need to grab a company's income statement and start with its top line -- that is, its revenue (sometimes listed as sales). That's the total amount of money it brings in for selling its goods and/or services. Moving down the income statement, you'll see various costs subtracted from that revenue. Margins are the percentages of profit left behind after you take out different sets of costs at various points on the income statement. We'll quickly go through each of the three main types of margins, and what each one measures.

Gross margin
Just under revenue on the income statement, you'll find "cost of goods sold" (a.k.a. "cost of sales," or COGS). The cost of goods sold represents how much it cost the company to produce the goods or services it ultimately sold to get its revenue. Over a recent 12-month period, for example, The Coca-Cola Co. (NYSE:KO) posted revenue of $46.2 billion and COGS of $17.8 billion. Subtract COGS from revenue, and you get a gross profit of $28.4 billion.

Dividing the gross profit of $28.4 billion by Coke's revenue of $46.2 billion yields a gross margin of 61%. Not too shabby, especially compared with rival PepsiCo, Inc.'s (NASDAQ:PEP) recent gross margin of roughly 54%. A gross margin can tell you how well a company is competing compared with its closest rivals. Note that different industries and businesses will tend to have larger or smaller gross margins. Coca-Cola is strictly a beverage company, while PepsiCo produces drinks and snacks (think Fritos, Doritos, Lays, Ruffles, and so on), and snacks cost more to produce than many drinks.

Rising profit margins are a good sign.

Operating margin
There are more costs to running a business than the raw materials and equipment used to make your products. You have support staff salaries, rent, utility bills, and countless other expenses to account for. Subtract these figures from the gross profit, and you're left with the operating profit -- $10.4 billion, in Coca-Cola's case.

Divide this figure by revenue, and you'll get the operating margin -- 22% for Coca-Cola, in our example. (PepsiCo's is 15%.) As with the gross margin, the operating margin helps you stack up a company's performance against that of its competitors. And like all margins, it can indicate how well a company is holding up. An operating margin that drops from one year to the next may suggest that a company is becoming less efficient in its internal operations.

Net margin
Finally, after items such as taxes and interest payments are accounted for, you're left with net profit (more commonly known as net income), near the bottom of the financial statement. Dividing Coca-Cola's net profit of $8 billion by its revenue yields a net profit margin of 17%. This number reflects how much of every dollar in sales a company keeps as profit -- the rock-bottom fundamental view of its fiscal strength. (To keep our comparison going, PepsiCo's net margin is 10%.)

What margins can tell you
Running several simple tests with margins can tell you a lot about a company and its competitors.

First, compare a company's margins with those of previous years. Rising margins indicate that a company is increasing its efficiency and profitability.

Next, check out the margins of the company's competitors. Is the company you're interested in more efficient than its peers? Look for significant differences in revenue, expenses, and costs of goods sold. Keep in mind that in many cases, as with PepsiCo, a competitor may have a meaningfully different business.

Finally, note that profit margins can vary widely. Those with less competition or powerful brands can often charge more. So can companies with monopolies, such as drug companies with multiyear patent protections on fast-selling drugs. Still, companies can do phenomenally well despite low margins, provided they compensate by selling huge volumes of services or goods. Wal-Mart fits that bill. Despite a gross margin of 25% and a net margin of 3%, its net income is close to what Coca-Cola and PepsiCo generate -- combined!

The differences between a company's gross, operating, and net margins can also tell you a lot. In the software industry, for example, many companies sport sky-high gross margins of 80% or more but much lower (though still high) net margins of 20% to 30%. That difference suggests that while it's cheap to physically create and distribute the software, the company is probably spending far more money on research and development, marketing, administration, and highly caffeinated sodas for the programmers' mini-fridges.

A fat profit margin means fat stacks of cash for the company. Photo: Wikimedia Commons user Moritz Wickendorf.

Profiting from margins
Profit margins shouldn't make or break your investment decisions, but they should be a factor. Overall, the bigger the margins, the better. When a company has slim margins, it has little room for price cuts or poor performance.

Keeping an eye on margins can help you focus on stronger, more profitable companies -- and increase the profitability of your own portfolio in the process.