Final answer:
To calculate the gain or loss to be recognized at the time of sale, subtract the accumulated depreciation from the selling price. In this case, there is a loss of $6,888.89 to be recognized.
Step-by-step explanation:
To calculate the gain to be recognized at the time of sale, we need to calculate the accumulated depreciation for the machine and compare it to the selling price. The machine was purchased for $40,000 and had an expected useful life of 9 years, so the annual depreciation expense would be $40,000 / 9 = $4,444.44.
Since the machine was sold on September 30, 2011, after 6.5 years (April 1, 2006, to September 30, 2011), the accumulated depreciation would be $4,444.44 * 6.5 = $28,888.89.
The gain to be recognized at the time of sale can be calculated by subtracting the accumulated depreciation from the selling price: $22,000 - $28,888.89 = -$6,888.89. Since the result is negative, it means that there is a loss of $6,888.89 to be recognized at the time of sale.