round of thousand in javascript code example Example: js round to nearest thousand var myValue = 23452.2; Math.round(myValue/1000)*1000; //23000