R&D Tax Credit Calculator still need help?

After learning from the MDN community forum, I start developing a r&d tax credit calculator. However, it seems that I need to know more in-depth. As I was trying to build this research and development tax credit calculator in HTML & CSS, I am only struggling with its logic. Can anyone sort this out for me? Thank you