Generally, under the Internal Revenue Code, you will be forced to pay taxes on any transaction that involves real estate and produces a gain at the time of the sale. However, if you sell your house, the Internal Revenue Code gives taxpayers a special tax treatment.