I recently inherited an IRA from my grandmother who passed away late last year. It's my understanding that I have to withdraw all of the funds from the IRA within 10 years. Since I don't need the money, I'd like to donate it. But I'd also like the IRA distributions to not negatively affect my taxes. Is it possible to set up a donor advised fund (DAF) and put the distributed money directly in it?
Sure.
How would this affect my taxes?
At a high level, the IRA withdrawal will increase your AGI by the amount of the withdrawal, and the DAF contribution can be an itemized deduction in the amount of the contribution. If you itemize already, this IRA withdrawal and DAF contribution will have no net effect on your taxable income, and therefore no effect on your basic tax before credits.
If you don't itemize already, your taxable income will increase by the difference between your standard deduction and whatever itemized deductions you could have claimed in the absence of the donation. For example, suppose you're married, have $10k of state/local tax you could deduct, $5k of mortgage interest, and no charitable contributions before your grandmother passed away. $15k is less than the standard deduction ($25,100 in 2021), so you haven't been itemizing. This year, suppose you withdraw $30k from your inherited IRA and donate it to charity. Now you have $45k worth of things you can deduct, so you itemize this year. However your itemized deductions are only $19,900 higher than the standard deduction. The rest of your $30k IRA withdrawal ($10,100) will increase your taxable income compared to last year.
That's how it works for your basic tax calculation. As
@secondcor521 noted, there are various tax credits that are based on your AGI rather than your taxable income. You'll need to see which of these (if any) you qualify for, at what AGI limits that would change, and try to keep your AGI below those limits in order to minimize the effect of this IRA on your taxes.
I will echo the recommendation to look into transferring appreciated stock into the DAF instead of cash. You get to deduct the current value of the shares, and you can use the cash from the IRA to buy that same stock right back again at current prices. It's a little more convoluted than just donating cash, but you get to reset your taxable cost basis this way.
Note that the limit for deducting stock donations is 30% of your AGI, and the limit for deducting cash donations is 60% of your AGI. If you donate some cash and some stock, they can only add up to 50% of AGI in total. Any donation above these limits can carry forward to be used as an itemized donation next year.
It's true that the limit on deducting charitable contributions was increased for 2020 and 2021. The higher limit only applies to direct cash contributions to operating charities. DAF donations don't count.