How to add numbers that are formatted like this?

Hi everyone,

I’m working on parsing HTML and I encounter prices that are formatted like “16.500” or “1.500”. I want to add these numbers together, so that 16.500 + 1.500 equals 18.000.

However, when I try to do this on Make.com, the platform automatically changes my numbers to 16.5 and 1.5, which leads to incorrect results when adding them together.

How can I handle numbers formatted this way on Make.com?

You’ll need to use the parseNumber function if your number does not use the internationally-recognised decimal-separator format “.

E.g.: parseNumber(16.500; ,)

Alternatively if the number is stored in a string format, you can use the replace function to remove the periods from your number:

E.g.: replace(16.500; .; {{emptystring}})

2 Likes