How to calculate percentage between the range of two values a third value is

Well, I would use the formula

((input - min) * 100) / (max - min)

For your example it would be

((65 - 46) * 100) / (195 - 46) = 12.75

Or a little bit longer

range = max - min
correctedStartValue = input - min
percentage = (correctedStartValue * 100) / range 

If you already have the percentage and you’re looking for the “input value” in a given range, then you can use the adjusted formula provided by Dustin in the comments:

value = (percentage * (max - min) / 100) + min

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)