# How do I determine the total amount and composition of a Roth IRA in-kind re-characterization?

I have to re-characterize all of my 2015 Roth IRA contributions. I made contributions throughout the year. I've used the contributions from this year and previous years to buy various stocks. I would like to make an in-kind re-characterization instead of liquidating some of the stock. This is how I've come up with the amount that needs to be re-characterized:

Suppose the FMV of my account was \$11000 the day before I made my first 2015 contribution, I contributed \$5500 for 2015, and the FMV of the IRA today is \$17000.

Then the amount I need to characterize is \$5500 * (1 + ((\$17000 - (\$5500 + \$11000)) / (\$5500 + \$11000))), which is about \$5666.66.

Note that I added the total 2015 contribution to the starting FMV but did not make any adjustments to the ending FMV.

I assume that I can take any combination of the securities in the account that add up to this amount, regardless of which year's contributions were used to purchase the securities.

Are my methods for calculating the re-characterization amount and my assumption about which securities can be used correct?