Multiple over contributions to retirement account

My question is relating to multiple over contributions to a solo roth of 401k.

 

At different times of the year I contributed various amounts most of these contributions need to be removed.

 

Well doing these calculations I was just doing one calculation starting with the date of the first over contribution as the account opening balance in the equation.

 

Now after thinking about it I think that's wrong I think I need to be calculating each over contribution separately because the opening balance is different each time these contributions were made.

 

So each time I think I should be getting a number for that specific over contribution and then at the end adding up all of those numbers together to get the full value of how much I over contributed.

 

And then remove that with a removal of excess form with my administrator.

 

I've done a lot of searching but I can't find where anyone has talked about multiple over contributions at various times.

 

I'm just double checking that what I said above is correct and I should be doing calculations separately for each over contribution.

 

Thank you so much this forum has been so much help to me!