Convert decimal-comma text to a number in Make
Read decimal-comma correctly for Make Free. 19,95 -> 19.95, check the math, and see when you get a change in value from a separator error.

If you are using a decimal point as a comma in numbers, you may have problems. For example, parseNumber in Make will turn a text into a number if you pass the right decimal point.
That's why this free-plan exercise makes sure that your number from text gets converted correctly before you use it in your workflow.
Before you start
First you'll need an account on Make. You can create a Make Free account (opens in a new tab) or log in.
Set your scenario to Inactive and select Run once
You don't need any other app.
1. Create the decimal-comma input
- go to Scenarios
- click Create scenario
- in the top left, give it a name Decimal number practice
- Add Tools > Set variable
- Variable name raw_price
- Variable value 19,95
- Save this module
- Save this scenario
- Click Run once
- Check the result bubble for raw_price: 19,95
2. Parse using a comma as the decimal separator
- Hide results panel
- Add new Tools > Set variable by clicking plus sign to the right of Tools
- Variable name = price_number
- Paste below expression to Variable value. Ensure raw_price is coloured token (module 1). Change source token in case of different module number.
- Save module / scenario
{{parseNumber(1.raw_price; ",")}}
Watch out
Just because you successfully run does not mean you got it right. When using a dot as the separator, you get 1995 out of 19,95 with this technique. Make sure to use the source decimal separator. Compare a small example you know against it and then you can go for a larger input.
3. Check the converted value
- click run once
- open the result bubble of the second Tools module
- in the Output section look for price_number: 19.95
For the arithemtic test, you need to replace your current expression with the given expression below for a moment. Save the module and re-run. Make sure you get 21.95.
Once you are done with this test, make sure you replace your old expression with your original expression to continue with the exercise.
{{parseNumber(1.raw_price; ",") + 2}}
If the value is much larger than expected
First check if decimal separator matches. Don't just strip all commas without knowing if they're for fractions or thousands groups. In this case the text is expected to be just digits with one decimal comma. Other characters like currency signs, blanks or mixed formats would require additional checks before trusting the value you get.
Parse numbers with thousands separators
Use the source's decimal. If it's fictional text like 1,234.56, the comma is used to delimit thousands and the period is used as the decimal.
- In the first "Tools - Set variable" module, change the "Variable value" to "1,234.56". (but keep the name 'raw_price'). Then save the module.
- In the 2nd module use price_number and paste the following expression in Variable value. Make sure that raw_price is the coloured token of module 1 and save. 2nd module price_number
- Save the scenario, and do "Run once". Then go to the result bubble of the second module. In Output, look for
price_number: 1234.56.
{{parseNumber(1.raw_price; ".")}}
For dot group of text in which decimal comma is used, set raw_price as 1.234,56 and use this comma expression. Then Save and run. The expected number is still 1234.56.
{{parseNumber(1.raw_price; ",")}}
When you use comma expression against 1,234.56 you get 1.23456. (It does execute).
To make sure it is an arithmetic issue, change back the raw_price to 1,234.56
Use the dot expression. Add + 2 temporarily in expression before you put the }} in it.
Save both modules. Scenario.
Run again. You should get 1236.56
Change the parse only expression back.
1,234 Ambiguous. If you select comma, you get 1.234. If you select dot, you get 1234. Make sure you know what the source is aiming for. Take a look at columns with both types of numbers before they get converted. Check a known input against expected output.
Input text is 1,234.56 (with thousands comma and dot decimal separator).
Output: price_number: 1234.56
If you want this as a step in a recurring workflow, use Make. If you just want to do this conversion in LibreOffice Calc, then there is a documented NUMBERVALUE function (opens in a new tab) that accepts =NUMBERVALUE("19,95"; ",") (yielding the number 19.95). The decimal separator that's shown will depend on the number format of the cell. If you want to do a bigger workflow, you can start with Make Free (opens in a new tab). Review the Free-plan limits before scheduling a big workflow.
Screenshots: imaginary practice data Calculation reference: Make math functions (opens in a new tab)
Share this post
From holdmytwist.com/blog/make-parse-decimal-comma-number/


