Deductions & credits

Thank you for your direct answers.  I understood your example but to put it in real terms, I took a $48000 distribution from IRA #1 and zero from IRA #2.  I entered my $12,000 basis and saw my tax due drop.  On the next screen I entered, as requested, the total value of my IRAs as of 31 Dec 2020.  That amount is $1,159,370.  The tax savings for this year almost completely disappeared.  Considering all these numbers,  did the program just prorate the percentage of non-deductible contributions used and keep track of them for all years to come?  Thank you.