If you go to this page https://www.barnardos.org.uk/donate/cashdonation_iframe.htm?customDonation=1.00&ref=131021&source=b&don_amount=1.00&submitButton=Single+Donation
and enter a donation amount and then click on the yes box you will see the percentage of the gift aid is worked out.

Can anyone help with a JS way to do this please?

Thank you Paul Kd I will go over this today, big help.