But that will still leave a dead space at the beginning and end of the pot. I need to convert on the fly a value from 400-900 to 100-235.

There has to be a formula to do this. I never got far in algebra in school. I don't even know what to use as a search string in google.