Well, you have a range of 5 and you want to scale that to a range of 100, so you’ll need to multiply by 20. You want to start at 8 though, so you need to subtract 8 * 20.

You should know the general process for figuring this out, just in case your situation changes and you want a new formula.

You want:
y = m * x + b

and you want this to be true for x=8 -> y=0, and for x=13 -> y=100.

So, you have two equations to solve for two variables:
0 = m * 8 + b
100 = m * 13 + b

If you subtract the first equation from the second, the b terms will cancel out:
100 = m * (13 - 8)
100 = m * 5
20 = m

Substitute 20 into either of the equations (the first is easier):
0 = 20 * 8 + b
b = -160

I hope this is helpful. When I saw the thread title “Complex math equation”, I thought we were going to discuss real and imaginary numbers. A math geek gets easily excited…