Why need to know the total 401k contribution basis when converting portion of it to RothIRA?

Hello,

Someone asked this question about why need to know the total 401k contribution basis when converting some of it to a RothIRA?

 

I thought that any contribution into a 401k account plus its earnings over years are all taxable when they are converted to RothIRA. So, what is the purpose of getting the total basis of 401k contributions for the purpose of RothIRA conversion?