As vital as taxes may be to a functioning nation, relatively few people are clamoring to pay more of them. (Much respect to Mr. Buffett, for example.) That's especially true when it comes to the money we're saving for our retirement. After all, when it comes time to live off your investments, you'll want to make every dollar count.

Those dollars are the subject of one listener's question in this segment of the Motley Fool Answers mailbag episode. He has been told about an obscure rule that lets you cash out shares of your employer's stock from your 401(k) at a lower tax rate. But how does it work exactly, and what's the best strategy for lowering your IRS bill with this tool? Hosts Alison Southwick and Robert Brokamp -- along with guest Megan Brinsfield, director of Foolish Planning with our sister company, Motley Fool Wealth Management -- walk us through the answer.

A full transcript follows the video.

This video was recorded on March 26, 2019.

Alison Southwick: The last question today comes from Jerry. "I have a question about 401(k) company stock. I have been told by Aon Hewitt that at the time of my retirement I can elect that all of my company stock be converted into actual stock, which means it will be considered as capital gains and not regular income. Do you know if this is true?"

Megan Brinsfield: Part of this rumor is true. We're not going to talk about the specifics, but this is referring to a provision called "net unrealized appreciation," which is specific to when you own your employer's stock within your 401(k) plan. Normally they don't care about cost basis inside a retirement account because it's all going to come out as ordinary income, anyway.

In this specific case, you do want to track your cost basis inside your retirement account for employer securities. And the reason is that when you retire, you have 12 months to take a full liquidation of your 401(k) to get this treatment. A full liquidation doesn't mean you have to cash out everything, but it has to leave the 401(k) structure, and you can take your employer's stock and put it into a taxable account. And rather than being taxed on the full value -- which would be the traditional treatment of any sort of distribution -- you're only taxed on the cost basis of that stock.

So if you've been working with the same employer for a long time and accumulated little by little, you can also select the lowest-cost-basis stock to hang onto and keep outside. The benefit of that is that you are paying on a lower distribution amount. Then when it comes out, you're taxed at long-term capital gains rates as you dispose of that stock.

That's a pretty beneficial treatment to get stock out and not have to pay those ordinary tax rates. It could be a big tax hit at once, though, if you've accumulated a lot of stock, and so again, I think this is another area where you would want someone to come in and take a look at your specific situation.

Robert Brokamp: Employer stock can get very complicated. You want to make sure you do it right and you want to make sure you're working with someone who not only knows the rules about employer stock, in general, but has a good handle on your particular plan.