Your basis for retirement income is determined by the total amount of after-tax contributions you made to your account over the years. Since you already paid income tax on this amount, you can withdraw that amount tax-free.
To find this number, you must typically review your historical tax records, such as Form 8606 or account statements. If you never made nondeductible or after-tax contributions, your basis is zero.