Many investors have reaped hefty returns from real-estate funds in recent years, but there are signs that the party may be winding down.

That’s because the prices of buildings—and the stocks of the companies that own income-producing real estate (known as real-estate investment trusts, or REITs)—are high. Commercial property prices have risen so much since the financial crisis that investors already have captured much of the future profits that real estate likely will deliver.

Just how good was the run? Investors in (VGSIX), for example, achieved 15.5% annualized returns from 2009 through 2016. Over that same time, the fund’s assets swelled above $60 billion from less than $10 billion.

With the help of Research Affiliates, a Newport Beach, Calif., investment firm, we came up with a way to estimate the likely future returns of REITs. The formula starts with dividend yield, adjusts it for property-maintenance costs, and then factors in an element of price, or how properties are trading relative to their history. Based on that formula, we predict REIT returns over the next decade won’t be nearly as robust as they have been over the past five years. Here is a closer look:

1. First, dividend yield

Real-estate investors estimating future returns of a commercial property start with the current rent minus basic expenses such as repairs, insurance, and taxes. That number—often called net operating income by real-estate pros—is the current profit properties are delivering to investors. Investors typically consider net operating income in relation to the price of property to arrive at what’s called a capitalization rate—or a rough estimate of an investor’s return on investment from a property or a portfolio of properties.