Per IRC §1368, the treatment of a distribution in excess of stock basis depends upon whether or not the S-Corporation has any earnings or profits from when it was a C-Corporation.
If there were no earnings and profits, then any amount distributed in excess of stock basis is considered gain from the sale or exchange of property according to IRC §1368(b)(2). The character of the gain is dependent upon the holding period of the S-Corporation stock.
So, you would report the gain first on Form 8949 Part II for Long-Term (assuming that you owned the S-Corp for more than a year). You would write "S-Corp Distribution in Excess of Basis" in the description (column A), put the date the S-Corp was incorporated (column B), the date of the distribution in Column C, the amount of the distribution in excess of basis in Column D, and zero in Column E. The gain is the distribution in excess of basis and is reported in Column H. The amount from Form 8949 goes on Schedule D.
The S-Corp K-1 should show the distribution on Line 16, with the code D. The nondeductible expenses would also go on Line 16, with the code C. The S-Corp does not show the basis calculation - it is up to each shareholder to maintain their basis. For my clients, I do provide basis calculations when I prepare the corporate returns. However, this is not required.
I hope this answers your question! If you have any more, please feel free to ask! I will be happy to assist you! If you have found my answer helpful, please rate me highly! I would appreciate that!
Again, thanks! Have a great weekend!