So, you'd record the gain, then the income tax on it, then the net goes into retained earnings vis the P&L account first.Then, the debit is a distribution from retained earnings, certainly not a loss. The loan to shareholder was essentially the account where various distributions over the years to the shareholder was recorded. We have had to catch up the accounting and taxes for this corp for the last 10 years since the owner died. But the final entry for 2012 includes the clearing out the loan to shareholder, with accrued interest which we treated as a dividend to her.
However, to avoid re-characterization of the loan as a dividend, the loan must be properly documented and made on terms (including a provision for interest) comparable to those on which an unrelated third party would lend money to you.However, a dividend distribution is generally not tax efficient because it is taxable to the recipient to the extent of the corporation's "earnings and profits," but NOT deductible by the corporation.There are, however, several alternative methods that allow you to withdraw cash from a corporation while avoiding dividend treatment: To the extent you have capitalized the corporation with debt, including any amounts you have advanced to the corporation, the corporation may repay the debt without the repayment being treated as a dividend.You may also establish a salary reduction plan that allows you (and other employees) to take a portion of your compensation as nontaxable benefits rather than as taxable compensation.You may withdraw cash from the corporation by selling property to the corporation. For instance, you should not sell property at a loss to a corporation you constructively own more than 50% of, since the loss on the sale will be disallowed.