Machine

A company sold for $40,000 cash a machine that originally cost $90,000. The accumulated depreciation on this machine was $47,000 at the time of the sale. What was the company’s gain or loss on this sale?