Accounting term that refers to earnings that are not distributed to owners. An s corp can have retained earnings.
There is also a tax term called “earnings and profits” which is essentially the same thing. If the entity is a C corp (or ever has been), you have to track E&P to determine the tax consequences of distributions to shareholders. If you have a partnership or S corp that has never been a C corp you don’t need to track E&P.
Any distributions from the s corp (that has never been an C corp) are non-taxable returns of capital as long as you have basis in you our S corp stock. Once you’ve used up basis, additional distributions are taxable capital gains.