So do I understand correctly that any profit that my ROTH made before recharacterizing, is not taxable?

My 2017 Roth investment was $6500.  In Jan 2018 I recharacterized  it (the original $6500 plus about $3000 profit) to a non deductible traditional IRA.  Then in Feb. 2018 I did a conversion from traditional back to Roth.  I can't figure out what is taxable and what my basis is.