This is a very basic question, I understand that.
So I have these numbers: 20, 0.75, 1.25. If you sort them, it would look like this:
20
1.25
0.75
I need to convert any number that's greater than 1 to a decimal that's less than 1 and greater than 0, and still sort like above.
So I thought about dividing 1 by that number. But naturally, that's not going to work with the 0.75, so 0.75 will be greater than 20.
So what formula can I apply to any positive number so that they all are less than 1 and greater than 0, and they still sort correctly with this new value (i.e. #1: 20, #2: 1.25, #3: 0.75)

There are many approaches. You need an increasing function that has a horizontal asymptote. One simple one is $f(x)=\frac x{1+x}$. When $x=0, f(x)=0$ and as $x$ gets large $f(x)$ goes to $1$.