After a brief test with everything from time machine to cursor, I think selling an item will refund you 0.575 times of the price for which you bought it. For example, you buy your first time machine for 123,456,789 cookies and when you sell it, you will get 123,456,789*0.575~=70,987,654 cookies back.
Nevertheless, it's a number too hard to memorize, and the principle is actually simpler. Since the cost of another building is multiplied by 1.15 when one is bought, the amount you are refunded by selling is just half (0.5 times) of the building's current price.