Default value of input is 10.10000, on document load and changes to the value of the input, JS will parse the float down to two decimal places alwasy leaving a trailing zero. More on parseFloat is avaialble on MDN .