MACRS Depreciation- year of disposal

How would you calculate MACRS using the tables if you sell a property before it has been fully depreciated? I'd like to know how to do this for real estate and personalty. And mid quarter vs half year personalty.