IRA Cost Basis

Hello,

I took a voluntary withdrawl from my IRA during 2024.  I made AFTER TAX contributions to this IRA.  I also made some AFTER TAX contributions in the past to my 401K in a different account.  How do I determine my tax basis in the withdrawl.  Do I combine the AFTER TAX contributions from both the tax deferred accounts or use only the after tax contributions to my IRA, the account I took the withdrawl from.  In other words, is my 401K tax basis a factor at all if I took an IRA distribution.

 

THANKS SO MUCH FOR THE HELP!