if a corporation elects to be taxed as an s corporation, then both it and its stockholders can avoid all federal taxes. this provision was put into the federal tax code in order to encourage the formation of small businesses.