Most workers spend a lifetime building up their retirement plan balances in their 401(k) accounts. When it comes time to cash in your 401(k), however, it's important to make sure that you account for it properly to the Internal Revenue Service in order to avoid any unwanted scrutiny. Depending on what you do with your 401(k), you'll need to handle it differently on your tax return. Below, we'll go through your different options.

Rolling over your 401(k)
The simplest thing to do with a 401(k) from a tax standpoint is to roll it over to an IRA. If you do a direct transfer from your old employer to the financial institution holding the IRA, there's no tax reporting necessary at all. You simply treat your new rollover IRA the same way you would any IRA, reporting withdrawals as necessary.

If you take the money out of your 401(k) directly, you have 60 days to complete a rollover to an IRA. You'll get tax information on Form 1099-R, but you won't have to pay tax or penalties on the distribution as long as it's rolled over in time and correctly.

Taking the money
By contrast, if you truly cash in your 401(k) and have money deposited into a taxable account, different reporting standards are necessary. You'll get a Form 1099-R at tax time that shows the amount of the distribution and the amount you have to include in taxable income, as well as any money that you might have had withheld for potential tax liability. At that point, it's up to you to include that income in the appropriate spot on your Form 1040 tax return.

In addition, if you were younger than age 59 1/2 when you cashed in your 401(k), then you'll need to file IRS Form 5329 along with your return. Form 5329 allows you to calculate the 10% penalty you might owe for taking early distributions from a retirement account. With 401(k) accounts, an exception to the penalty applies for withdrawals made after you separate from service if you were at least 55 when you left your job. In that case, you'll report the amount taken as an exception to the rule and end up paying no penalty. However, for younger taxpayers who don't qualify for any exception, the penalty amount gets included on your tax return and increases the total amount you'll owe to the IRS.

Cashing in your 401(k) is always an option that's available to you. To minimize your tax, however, taking advantage of the ability to transfer 401(k) money to a rollover IRA has a lot of appeal and can be the smarter choice compared to taking cash all at once.

This article is part of The Motley Fool's Knowledge Center, which was created based on the collected wisdom of a fantastic community of investors. We'd love to hear your questions, thoughts, and opinions on the Knowledge Center in general or this page in particular. Your input will help us help the world invest, better! Email us at [email protected]. Thanks -- and Fool on!

Try any of our Foolish newsletter services free for 30 days. We Fools may not all hold the same opinions, but we all believe that considering a diverse range of insights makes us better investors. The Motley Fool has a disclosure policy.