var a='1,125'; a=a.replace(/\,/g,''); // 1125, but a string, so convert it to number a=parseInt(a,10);