Cap Gains from Sale of Living Grantor's Primary Residence from Irrevocable Trust
My mother and I set up an irrevocable grantor trust for her for which I am the trustee. She is the beneficiary and recipient of all income generated from the trust. Her spouse (my father) is deceased as of Oct 2009. We put her primary residence of 30+ years into the trust upon its creation in Dec 2010 and then in Dec 2011 my mother had to move out of the house and into an assisted living facility. I sold the house in April 2012. The attorney who set up the trust directed us to keep all proceeds of the home sale in the trust and says the sale should be reported on the trust's 1041 tax return. She also says that the trust was set up in way that it would receive the benefit of the $250k capital gains exclusion on a primary residence if we ever sold. The capital gain on the sale of the house was $140k, well under the exemption limit.
In using a popular tax prep software package, I'm having trouble figuring out how to input/represent the capital gains from the house sale to obtain the exemption. The proceeds were not paid out to the beneficiary so the gains keep showing up in 14a(2) of Schedule D which results in a significant amount of taxes being owned. If I move the home sale gain amount out of 14a(2) (attributable to the trust) and put it into 14a(1) (attributable to the beneficiary instead), the tax due amount goes even higher. So then if I go back to Schedule B on the 1041 and adjust line 9 so as to add in the cap gains from the house (i.e. showing distribution to the beneficiary), that brings my tax owed to $0. But the gains really weren't distributed to the beneficiary (they stayed in the trust) and the beneficiary's K-1 then includes the capital gains from the sale of the house.
Any advice would be greatly appreciated. Thanks.