Sorry that the title is badly worded, ill try to explain it better here:

I have 2 numbers, i.e 20 and 80, and i want to be able to get the numbers between them with 0 - 1, so for example 0.5 would be 40 (should be able to handle diff numbers too not just 20 and 80 ofc)

i have no idea how to do this correctly, and i cant find any solutions online cause i cant really word it together either

edit: my brain shortcircuited, 0.5 wouldn’t be 40 ( 20 + 80 = 100 / 2 = 50)

I don’t think I understood what you wanted correctly because you need an inverse lerp function if that makes sense. You said that you wanted to find the 0 - 1 equivalent of a number between 2 other numbers compared to lerping which finds the number equivalent of a 0 - 1 range within 2 numbers.