Open this example in the interactive library
Source code
const mm = 210,
dpi = 300;
console.log(Math.round((mm / 25.4) * dpi));
Sample output
2480

Open this example in the interactive library
const mm = 210,
dpi = 300;
console.log(Math.round((mm / 25.4) * dpi));
2480