Converting IR value to distance

Have you looked at the datasheet? It has a curve of values and distances for the sensor.