Ah, well this isn't really an issue of HTML, what you want is something like react or javascript that when the page is loaded will do these maths for...
So I still don't know what you're asking for. If you're painstakingly clear (ie step by step what you want to do, never using words like or that and...
Uro, imo, is worth the hoops and I think Sailor's bane is too because it leaves the cards in the yard for either Uro or this guy, who I am instantly...