Question about calculating "earnings" on excess of contributions to IRA

Hello, I have an issue with excess of contributions to an IRA. Can you let me understand if I have these calculations correct.

 

Assume, I have a total of $11,000 of excess contributions to Roth IRA, with account balance starting at $0. There was one deposit of $10,000 and a later $5,000 deposit (all after-tax money; it is from Roth 401k). Assuming no other appreciation/growth/etc. I am using the Net Income Attributable formula (I think this is the right formula to use?), one example here: https://www08.wellsfargomedia.com/assets/pdf/personal/goals-retirement/taxes-and-retirement-planning....

 

So my starting account balance is $10,000, and the ending balance is $15,000. That means I have to pay taxes on 11000 * (15000-10000)/10000 = 5500. So if I am doing this correctly, I am paying another $5,500 of taxes (despite zero actual growth since it is all from contributions)? If so, is this tough luck, don't do this again in the future? Thanks.