What is Total Basis in my Traditional IRA

I have multiple IRA accounts, Traditional, Rollovers, Roths (with conversions), 401ks, etc. over many years.

One of my rollovers was from a 401k that includes after tax contributions.

As an example, assume I have the following:

Traditional: 10k contributions, 15k end 2018 value (after 4k distribution)

Rollover 1: 10k value at time of rollover (100% pre-tax in 401k), 14k end 2018 value

Rollover 2: 12k value at time of rollover (10k pre-tax, 2k after tax), 16k end 2018 value

Roth: 10k contributions, 18k end 2018 value

 

In 2018 had distribution of 4k out of Traditional (towards son's college tuition).

How do I determine my basis, for reporting against the distribution I took?