2024 Roth IRA Contribution question

Hello,

 

I would like to contribute funds to my Roth IRA for 2024.

Based on my MAGI, Age and Status, I can contribute about 5K (Different sites gives different contribution amount for some reason).

 

However, I am not too clear if my 2024 contribution limits are based on 2023 taxes,

or

They are based on 2024 taxes which not filed yet? Do I need to approximate my 2024 MAGI or AGI, adding any raises, bonuses, Interest earned from CD/HYSA, stocks gains or loses (which I may not have yet)?

 

I am just afraid to contribute too much and will need to withdraw and amend tax return, etc,

 

Thanks for the help,

Gal