Percent String to Numeric Value

Convert a decimal cell ending in percent to an exact decimal fraction, using a dot decimal separator and no grouping; one percent equals one hundredth.

Description

A displayed percentage represents a fraction multiplied by 100: 12.5% corresponds to 0.125.

A displayed percentage represents a fraction multiplied by 100: 12.5% corresponds to 0.125. Keeping decimal arithmetic in strings avoids introducing binary floating-point rounding during this conversion.1

Convert a decimal cell ending in percent to an exact decimal fraction, using a dot decimal separator and no grouping; one percent equals one hundredth.

When to use Percent String to Numeric Value

Use this tool to convert a decimal cell ending in percent to an exact decimal fraction, using a dot decimal separator and no grouping; one percent equals one hundredth.

Choose the original CSV text, decoded cell strings, byte values or counts requested by this tool. Use the stated delimiter, encoding, indexing and number/date convention.

How to use Percent String to Numeric Value and understand its results

  1. Choose the original CSV text, decoded cell strings, byte values or counts requested by this tool. Use the stated delimiter, encoding, indexing and number/date convention.
  2. Enter text using the field table and calculation rules, then run the tool.
  3. Read value. The explanation below defines the units, signs, ordering and any flags or placeholder values.
  4. If the tool reports an input issue, correct the values and run it again. Apply the stated assumptions when interpreting a successfully returned result.
Input fieldMeaningValue type; see rules belowRequirement
textTextstring; maximum length: 200Required

Enter one trimmed decimal token ending in an ASCII percent sign. The tool removes that sign, parses a signed dot-decimal with no thousands grouping, and increases its decimal scale by two using an integer coefficient. The result is a canonical plain decimal string: redundant zeros are removed and negative zero becomes 0. Whitespace before the percent sign is tolerated by the decimal parser; exponent notation, a missing integer part and an empty fractional part are rejected.

fraction = exact decimal coefficient × 10^(−fractional digits − 2)

Units, indexing, boundary conditions and exceptional cases are defined in the calculation rules above.

Output fieldMeaningValue type
valueValuestring
json
{
  "input": {
    "text": "12.5%"
  },
  "output": {
    "value": "0.125"
  }
}

Limitations and assumptions

The output is a string, even when it looks numeric. This does not identify percent-like fields in a table, preserve presentation zeros, or guess decimal-comma conventions. It requires an explicit percent sign.

Numeric inputs must be finite. Follow the calculation-specific rules for overflow, underflow and exceptional cases. Extremely large text inputs are rejected. Missing required fields, extra fields, wrong value types and violations of the calculation rules are input errors.

Alternative or Complementary methods

Use Currency Symbol Strip to Number: Remove at most one leading or trailing Unicode currency symbol and parse an exact decimal using explicit decimal and grouping separators; embedded symbols are rejected. For a complementary task, use Decimal Separator Dot vs Comma Detector: List decimal separator profiles compatible with all nonblank cells, allowing opposite-character thousands grouping; ambiguous values such as 1,234 keep both interpretations.

References

  1. Percent String to Numeric Value — tool.io

Similar or alternative tools

  • Currency Symbol Strip to Number

    Remove at most one leading or trailing Unicode currency symbol and parse an exact decimal using explicit decimal and grouping separators; embedded symbols are rejected.

  • Decimal Separator Dot vs Comma Detector

    List decimal separator profiles compatible with all nonblank cells, allowing opposite-character thousands grouping; ambiguous values such as 1,234 keep both interpretations.

Don't forget to set a bookmark for tool.io!
Privacy | Imprint | Cookies