Fast-food chain McDonald's (MCD -0.42%) has been a big winner over the past decade. Shareholders enjoyed 185% gains in price and 275% gains in total returns if you include dividends. Ironically, the company's sales are 15% lower today than a decade ago.

So what gives? McDonald's has used its robust cash profits and balance sheet to shrink its share count and increase its share price. However, McDonald's might struggle to continue on this path. Here is what you should consider before buying the stock for your portfolio.

The magic of share repurchases

McDonald's is known for its outstanding dividend track record, which includes 47 consecutive increases and offers investors a solid 2.2% yield at the current share price. But McDonald's has leaned heavily on share repurchases over the years, buying its shares to take them off the market and reduce the number of outstanding shares.

Fewer shares mean that earnings per share (EPS) increases because there are fewer shares to spread the company's profit across. This typically results in a higher share price because investors often value a stock based on how much profit they get per share for their money.

MCD Stock Buybacks (TTM) Chart

MCD Stock Buybacks (TTM) data by YCharts

You can see in the above chart that McDonald's has spent billions in repurchases over the years, reducing the number of outstanding shares by more than 25% over the past decade. McDonald's net income (the company's bottom-line profit) has increased by about 8%, but the EPS has grown 71% due to all the share repurchases.

Approaching a potential debt ceiling

There isn't anything wrong with share repurchases unless they're done irresponsibly, and here McDonald's management team might deserve some scrutiny.

The company is generating between $3 billion and $6 billion in cash profits in a given year while spending about $4 billion annually on its dividend. If McDonald's wants to spend more than what it has left after paying its dividend, it must use cash on its balance sheet or borrow.

You can see below that McDonald's has been a steady borrower for years, pumping up its total debt to nearly $35 billion. But since the company's total profits haven't grown that much, the leverage ratio (shown as debt to EBITDA) has risen, too.

MCD Total Long Term Debt (Quarterly) Chart

MCD Total Long Term Debt (Quarterly) data by YCharts

It's fair to ask how much more McDonald's can borrow; typically, I look for leverage to remain below a ratio of 3, and McDonald's is already past that.

The dividend takes up a lot of cash flow with a 70% dividend payout ratio, so the company should be careful not to back itself into a financial corner. It seems likely that share repurchases will, at the very least, slow over the coming years.

Can McDonald's grow on its own?

The burning question for investors is whether the company can grow without massive share repurchases. Consensus analyst estimates call for revenue growth averaging between 3% and 5% annually for the next several years, which could mean that EPS growth slows notably if share repurchases stop.

The stock averaged a P/E ratio of more than 24 over the past decade, but a slowdown in growth could mean the stock goes below that. That's potentially ominous for shareholders considering the stock's already well above its average valuation at a P/E of 34.

MCD PE Ratio Chart

MCD PE Ratio data by YCharts

McDonald's is a great business that's proven its resiliency for decades, but it seems that a lot is working against investors. The company needs to find a spark of new organic growth. Otherwise, the stock's expensive valuation could be a driving force behind disappointing returns that fail to live up to the expectations the past decade has created.