What is considered the right time to exit a real estate investment?

Real estate only pays off if one spends at least 3-4 years in a house. There is no quantitative approach to quantify but one can exit a property based on the return on experienced investment and funds expense.