Cost basis of IRA when considering a Roth rollover

If I have a cost basis in a Traditional IRA of $20,000 and those contributions never qualified to be a tax deduction on my Federal return in any of the years contributed, and the current value of said IRA is now $60,000, IF I rollover to a Roth, is the taxable amount $60,000 or $40,000?