Change Font-Size within Input

Anyone know how to change the font size to fit inside the input box depending on the length. For example a number field:

25.94 - this would fit fine, but
2543343.99 Is longer so I want the text to decrease as the number gets larger