Closing a 529 account

I have been contributing to two 529 accounts, one for my niece and one for my nephew. There is about $32,000 in each account. As it turns out, my niece and nephew are not going to need this money, and I have no one else in
mind and no other educational use for the money. So, I want to close both accounts. I know I will have to pay tax on the gains in the account, and I know there is some kind of 10% penalty but I am not sure what that is (10% of what?).
But, here is my real question: I am 59 and will soon be 59 1/2. Does it make any difference if I close the 529 account before I am 59 1/2 instead of after I turn 59 1/2? I assume it makes no difference because it's not the same as an IRA that I would have in my name, but I thought I'd check just to be sure. I am also going to check with the plan administrators (or whatever they are called), but I thought I'd also ask here in case they give me erroneous information.
Thanks.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
I just found out the answer. Being older or younger than 59 1/2 has no impact. I will receive the entire balance from the company then will have to pay ordinary income tax on the gain, plus pay an additional penalty of 10% of the gain. Basically, 32 K went into each account, but they say the accounts are now each worth 38K. So if I close the accounts, for each account I will receive a check for 38K, then will owe tax on the 6K gain plus a penalty of $600 (10% of the gain).

Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
unless you attend school and use the $ for your own education expenses...

Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

BeanSmart.com is a site by and for consumers of financial services and advice. We are not affiliated with any of the banks, financial services or software manufacturers discussed here. All logos and trade names are the property of their respective owners.

Tax and financial advice you come across on this site is freely given by your peers and professionals on their own time and out of the kindness of their hearts. We can guarantee neither accuracy of such advice nor its applicability for your situation. Simply put, you are fully responsible for the results of using information from this site in real life situations.