As a general "income tax accounting" rule, you want to keep records that support amounts shown on tax return for at least three years after the date you file the return or return due date (whichever is later.)
This would mean for real estate three years after the date you file the last tax return that includes income or deductions connects to a property.
But this could be a long time. If you bought a property three decades ago but only sold it last year, you'll want to keep documents for last three years after the last tax return with the sale on it.
If you did a Sec. 1031 exchange of a property you held for three decades and then held the replacement property for three decades and then sold the replacement, technically, because the basis of the replacement property depends in part of the original purchase price paid six decades ago, you'd want that documentation.
BTW, one other wrinkle, which shouldn't matter to many people but is worth mentioning: The usual "tax law" statute of limitations runs three years from last filing. But it can run 6 years or longer if certain conditions apply like a substantial understatement of income or taxpayer has engaged in criminal violations of tax law.