(a) In general

For purposes of this subtitle, the taxable year of any trust shall be the calendar year.

(b) Exception for trusts exempt from tax and charitable trusts

Subsection (a) shall not apply to a trust exempt from taxation under section 501(a) or to a trust described in section 4947(a)(1).