Now, with year-end drawing close, is the last chance to take advantage of a special tax device for charitable giving if you are over 70½. With this stratagem, you make a philanthropic donation of up to $100,000 from your retirement fund -- and your altruistic act both lightens your tax liability and counts toward your tax-deferred retirement account's annual distribution.

Alas, this wonderful maneuver, called a qualified charitable distribution (QCD), has a few things to watch out for, especially where last-minute charity donors are concerned.

Like if: 1) you already took out the annually required amount of money from the IRA and, although it's too late to make a QCD, you do one anyway; 2) the money passed through your hands first before you made the contribution, instead of moving the dollars directly from the IRA to the charity; and 3) the donation delivery and the gift's documentation got messed up.

First, though, let's explore how the QCD works. Since 2006, Americans have been able to make QCDs from their traditional or inherited individual retirement accounts, provided that they are 70½ or older. All you need to do is to direct your IRA custodian to send your contribution to the philanthropy of your choice.

You can give to as many charities as you want, just so the total doesn't exceed $100,000. Note that you must make the donation from an IRA, not from a 401(k) or 403(b). While Roth IRAs are permitted, their distributions are tax-free already, so a QCD might not make sense. As Michael Kitces, a partner at Pinnacle Advisory Group, has written, "a QCD is generally a moot point" for a Roth.

The beauty of the QCD tactic is you don't need to itemize to use it. And with the standardized deduction almost doubled for tax year 2018 (to $13,600 for individuals 65 and up, and $26,600 for couples who are 65-plus), fewer will want to itemize.

The math may favor your going for the standard deduction and the QCD, rather than itemizing and getting a tax deduction for your contribution. (You can't both do a QCD and itemize a charity deduction.) According to Carol A. Magyar, tax director at G.T. Reilly tax advisors, using the QCD-standard deduction combo could be the best choice because the Tax Cuts and Jobs Act of 2017 may have pared write-offs you customarily took for home mortgage interest and state and local taxes.

The main way a QCD can help is by eliminating or lessening the tax bite on your required minimum distribution (RMD) -- the amount you must take out of your retirement funds annually once you reach 70½. Say your RMD for the year is $30,000. You ordinarily would add that amount to your taxable income. By making a QCD of $30,000, channeling that RMD money to charity, this sum is not counted toward your income, and thus not taxed.

And that's not all. By using a QCD to reduce your taxable income overall, "this may put you into a lower income tax bracket," says Tom Lesko, a senior wealth management consultant at Manning & Napier Advisors.

You don't have to dedicate the entire RMD to the charity contribution. After all, you may need some of that RMD to pay your household bills. An example of how this would work: Your RMD for the year is $60,000, you're in the 24% bracket, and you want to shunt $20,000 of the RMD to your favorite charity. You send that $20,000 to the worthy cause and keep $40,000 of your RMD. Presto, you reduce your federal tax bill on the RMD to $9,600 instead of $14,400.

And Lesko points out, there are additional pluses from whittling down taxable income, which determines how high your Medicare premiums are and how much tax is taken from your Social Security benefits. Also, a QCD-lowered reported income may let you avoid the alternative minimum tax and the 3.8% surtax on investment income.

Nevertheless, as with most tax matters, there are some hazards:

You Used Up Your RMD

Although people tend to take their RMD near year-end -- you must tap that money by Dec. 31 -- you may have already drawn out 100% of the RMD. Unfortunate upshot: You can't give the money back to the IRA so you can make a QCD, and you can't fund a QCD with already-withdrawn money. As the IRS sees the issue, any money you pocket from an IRA is automatically part of your RMD, and therefore taxable. So making a QCD too late is an extreme folly.

On the other hand, perhaps you have taken out just two-thirds of your RMD. Then you still have time to send the remaining third to charity.

You Touched the Money

The contribution must be made directly from the IRA, and never pass through your bank account. That's why you want to tell your IRA custodian to send the donation straight to the charity. The check must bear the charity's name. Be sure you get a document from the IRA about what they did.

In the same vein, the money has to go to a recognized charity, not a donor advised fund (which you control) or a private foundation.

Your Donation Got Delayed or You Failed to Document the Gift Right

The nightmare scenario, as sketched by Megan Russell, chief operating officer of Marotta Wealth Management, has your check arriving after Jan. 1 or getting lost in the mail. "It might be the new year," she warns, "and you're stuck with a 50% penalty from not meeting your RMD in the proper year."

As an extra safeguard, she suggests, have the IRA cut the check with the charity's name on it but mail it to you. Make a copy of the check, so you can show the IRS proof that it was sent out. And be sure to save all documentation for the tax authorities. The IRS wants paper evidence, not your earnest recollection. "This gives you the protection you need," Russell explains, "in the event that something goes wrong or the IRS gets confused."

The QCD illustrates how the tax code can work for you, provided that you are very careful how you tread.

About the author: Larry Light is the markets editor of Chief Investment Officer magazine. He has previously been an editor and reporter at the Wall Street Journal, Forbes, BusinessWeek, MONEY and CBS MoneyWatch. He is the author of Taming the Beast (John Wiley), a history of investment strategies.

It's never too late -- or too early -- to plan and invest for the retirement you deserve. Get more information and a free trial subscription to TheStreet's Retirement Daily to learn more about saving for and living in retirement. Got questions about money, retirement and/or investments? Email Robert.Powell@TheStreet.com.

More from Personal Finance

Income Tax: Definition, Brackets and State-By-State Differences

Income Tax: Definition, Brackets and State-By-State Differences

Personal Capital vs. Quicken: Which Software Is Better in 2019?

Personal Capital vs. Quicken: Which Software Is Better in 2019?

How Much Does Netflix Cost and What Are the Subscription Options?

How Much Does Netflix Cost and What Are the Subscription Options?

What Are the Different Types of Interest and Why Do They Matter?

What Are the Different Types of Interest and Why Do They Matter?

Leaving All the Financial Decisions to One Spouse Is Asking for Trouble

Leaving All the Financial Decisions to One Spouse Is Asking for Trouble