You can only contribute $5000 total any time for the year.
Contribution room is earned back the following year from withdrawals done in one year...
Example...
5000 contribution....max limit reached
2000 withdrawal
2000 re contribution...you have now over contributed 2000...
you are now taxed at a rate of 1% per month on excess contributions...
for an annual total rate of 12%...
2nd Example...
4000 contribution... 1000 left in room
2000 withdrawal...
2000 contribution... you now have over contributed 1000 and will be taxed at 1%/month for over contribution
These opinions are entirely my own and do not represent any other person or organization.