Tablora

Tablora · Library

Convert a stated percentage to its decimal value

A percent sign changes the scale: 12,5% becomes 0.125, not 12.5. See how the normalizer shifts the digits and what to check downstream.

A percent sign is a scale, not decoration

Rates, discounts, shares and growth figures often arrive with a percent sign: 12,5% or 4.75%. Deleting the sign leaves 12.5, which is a hundred times too large if the receiving sheet expects a fraction. The numeric normalizer treats a trailing percent sign as part of the value's meaning and converts the number to its decimal form.

It does this by moving the decimal mark two places to the left in the digits themselves, so no rounding or floating-point arithmetic is involved.

12,5% under a decimal comma

The page example uses Decimal separator , and Grouping separator . with the source value 12,5%. The result is 0.125. The comma is read as the decimal mark, the percent sign is removed and the value is scaled, giving three decimal places.

Under the same settings, 100% would become 1.00 and 0,5% would become 0.005. A space before the percent sign, as in 12,5 %, is accepted as well.

Because the shift works on the digits, the result can have more decimal places than the source: 12,5% has one decimal place and 0.125 has three. That is the exact value, not a rounding effect, and it is worth keeping when the rate is later multiplied by an amount.

Converting a rate column

Mistakes with percentage columns

Original synthetic example

Source value
12,5%
Decimal separator
,
Grouping separator
.
Expected outcome
Normalized amount: 0.125

Tools