Knowing when the time has come to sell a property is a necessary skill for maximizing income and managing expenses. With home prices in many West Coast markets nearing all-time highs, this skill could help determine profit or losses for California real estate investors in 2018.

Until recently, steadily rising California home prices made it relatively easy to book profits, but price gains are beginning to slow. As a result, the California Association of Realtors predicts just 1% improvement in single-family home sales in 2018. California benefits from an improving economy and low interest rates, but is challenged by a persistent shortage of homes available for sale, which is spiking prices, making homes less affordable for the average buyer and weakening sales growth.

Some believe that California real estate is already overpriced, but this belief alone shouldn’t automatically trigger a decision to sell. Overheated markets are far more likely to decelerate than crash and home prices eventually level off. Growth continues, albeit at a slower pace, as long as the local economy remains strong.

To gauge when a market is approaching peak levels, investors first need to analyze historic home values, price movements over several months, and trends in days on the market. The strength of the local job market must also be considered since job growth attracts new residents and increases housing demand. Realtors are often a great source for this information and provide a broad prospective on local markets.

Here are five scenarios that may trigger a decision to sell.

When to Sell Investment Property

Property returns fall short of expectations.

A property performing below expectations could lead to a decision to sell. Poor performance can result if home prices or rental rates are dropping, the property is difficult to rent, or repairs are more extensive than originally estimated. In these situations, it’s often preferable to accept a modest loss on sale now and avoid pouring cash into a bottomless money pit, based on a mistaken belief that the market must eventually turn around.

Proceeds can be reinvested for better returns elsewhere.

Every investment comes with an opportunity cost, which is defined as the potential gain being surrendered that would be available from an alternative investment. Investors could be missing out on better returns from another property market or from another type of investment (such as stocks or bonds) by allowing cash to sit idle in an under-performing property. To calculate opportunity costs, investors need to take into account entry and exit costs, maintenance expense, financing costs and taxes. If the opportunity cost is higher than the costs associated with re-allocating capital elsewhere, selling the existing investment could present an opportunity to increase wealth.

Significant additional investment required.

A rental property that has been a cash cow when only routine maintenance was required can quickly become a money pit when a new roof or foundation becomes necessary. Expensive repairs create major headaches for investors and consume substantial amounts of time and cash flow. If big repairs become necessary, it is often preferable to accept a lower price by selling the property as-is and avoiding the hassles of major repairs. Most investors come out ahead by selling a potential money pit and investing the sale proceeds in a problem-free property.

Property no longer fits your strategy.

Some fix-and-flip investors also own rental properties. While rental properties generate desirable monthly cash flows, not everyone has the temperament to be a landlord. For some investors, the time and effort involved in managing properties creates an undue amount of stress. For these investors, the non-monetary costs associated with being a landlord far outweigh the financial rewards. If managing properties is more trouble than it’s worth for you, consider selling the rentals.

Another mismatch between property and strategy happens when investors seek better opportunities in a new geographic market. In this scenario, the existing properties from the old market no longer fit with the new strategy. Long-distance commuting to oversee fix-and-flip projects or check on rental properties can create many potential headaches. For example, contractors left unsupervised are more likely to miss deadlines or perform sub par repairs. Similarly, tenants left unattended are more inclined to be late with rent payments or damage the property. In the long run, outcomes are usually improved by selling the distant properties and concentrating investments on properties closer to home.

Property becomes fully depreciated.

Depreciation is a non-cash expense that property investors can leverage to reduce tax bills. The most common form of depreciation for property investments is straight-line depreciation, which depreciates a rental structure’s value (defined as purchase price minus land value) over a period of 27.5 years.

The tax savings associated with depreciation expense can be considerable. For example, a rental structure valued at $350,000 would deliver an annual depreciation deduction of $12,727 (i.e. $350,000/27.5 = $12,727). Because of the tax effect, it often makes sense to divest fully depreciated properties so that the sale proceeds can be invested in properties that still qualify for a depreciation deduction.

When determining whether to hold or sell a property, relevant factors that affect decisions include 1) business strategy, 2) property performance versus plan, 3) costs of maintenance and upgrades, 4) depreciation expense, and 5) returns available from alternative investments. Investors who are not considered dealers by the IRS can usually avoid paying capital gains taxes on profits from a sale by investing in a like-kind property through the 1031 exchange program. Although it’s never advisable to sit on a property that is losing money or misaligned with your business plan, depending on the performance of other assets in the portfolio, investors may be able to lower their overall tax bill by postponing a sale so that taxes are deferred into another quarter or even a new fiscal year. An accounting expert can help real estate investors structure their operations and investments to minimize taxes.