React Native Javascript Range Slider revert formula

I’m creating a range slider with two buttons to move the minimum value and another for the maximum value in react native from scratch. I already have the formula so that depending on the position of the slider it gives me its corresponding value:

enter image description here

const min = 1100;
const max = 11800;
const minPosition = 10.5;
const sliderWidth = 327;
const step = 100;

const minValue = min + Math.floor(minPosition / (sliderWidth / ((max - min) / step))) * step;
// minValue = 1400

I don’t know how to do the inverse operation so that the range slider receives for example a value of 1400 (minValue) and returns the position of the slider (minPosition), which in this case would be a value of 10.5