This will do what you want:
Math.round(value/1000)*1000
examples:
Math.round(1001/1000)*1000
1000
Math.round(1004/1000)*1000
1000
Math.round(1500/1000)*1000
2000
This will do what you want:
Math.round(value/1000)*1000
examples:
Math.round(1001/1000)*1000
1000
Math.round(1004/1000)*1000
1000
Math.round(1500/1000)*1000
2000