As investors, we need to understand how our companies truly make their money. Thankfully, there's a neat trick developed for just that purpose: the DuPont formula.

The DuPont formula can help you get a better grasp on exactly where your company is producing its profit, and where it might have a competitive advantage. Named after the company that pioneered it, the DuPont formula breaks down return on equity into three components:

Return on equity = Net margins x asset turnover x leverage ratio

High net margins show that a company is able to get customers to pay more for its products. (Think luxury-goods companies.) High asset turnover indicates that a company needs to invest less of its capital, since it uses its assets more efficiently to generate sales. (Think service industries, which often lack high capital investments.) Finally, the leverage ratio shows how heavily the company relies on debt to create profit.

Generally, the higher these numbers, the better. But too much debt can sink a company, so beware of companies with very high leverage ratios.

Let's take a look at Dollar General (NYSE: DG) and a few of its sector and industry peers.

Company

Return on Equity

Net Margins

Asset Turnover

Leverage Ratio

Dollar General

14.8%

3.9%

1.38

2.77

Family Dollar (NYSE: FDO)

27.0%

4.5%

2.92

2.04

Dollar Tree (Nasdaq: DLTR)

27.0%

6.5%

2.52

1.66

99 Cents Only Stores (NYSE: NDN)

12.0%

5.2%

1.86

1.25

Source: Capital IQ, a division of Standard & Poor's.

While deep discount might conjure images of razor-thin margins, these retailers earn better margins than some of the biggest dogs in the industry. Dollar General earns an attractive return on equity, even though its asset turnover and margin are the lowest of this group. So leverage is particularly important for its returns. Family Dollar and Dollar Tree both get to their 27% return on equity by emphasizing different factors. While Dollar Tree scores much higher margins, Family Dollar pushes up its ROE with higher asset turnover and more leverage. Despite its name, 99 Cents Only Stores still manages to earn a decent net margin, but lower leverage makes ROE look less attractive.

Using the DuPont formula can often give you some insight into how a company is competing against peers and what type of strategy it's using to juice return on equity.