Retirement tax questions

Your basis is any amount you contributed but didn't get a tax deduction for.  The 401K is usually pretax and doesn't have a basis.