Retirement tax questions

Are you referring to basis for PA income tax?  If so, you include all contributions EVER made to the retirement account less any distributions EVER received in the past.