Use VALUE(Text_Field__c) in a Salesforce formula to convert a text field containing digits into a number.
Replace Text_Field__c with the API name of your actual text field. The resulting formula can supply a numeric value to other calculations, comparisons, or formula fields. It does not change the stored field or its data type; it converts the text only while evaluating the formula.
One important distinction affects the workflow: Salesforce VALUE() handles numeric text, not written-out English number words. If a record contains “two hundred forty-six,” convert that phrase to digits outside Salesforce first, then place the digit representation in the text field and use VALUE() as described below.

What VALUE() changes in a Salesforce formula
Salesforce formula fields can use VALUE() to turn a text representation of a number into a numeric result. The source field must contain a value that VALUE() can interpret as a number. If the source is already a Number field, reference it directly; wrapping it in VALUE() is unnecessary.
| Source condition | Formula pattern | Expected behavior |
|---|---|---|
| The text field contains digits only | VALUE(Text_Field__c) | Returns a numeric value for the surrounding formula. |
| The text field is blank | IF(ISBLANK(Text_Field__c), 0, VALUE(Text_Field__c)) | Uses the explicit fallback shown in the pattern. |
| The text field contains nonnumeric words | VALUE(Text_Field__c) | Produces a formula error when the text cannot be converted. |
| The source field is already a Number field | Text_Field__c | Uses the stored number directly without VALUE(). |
VALUE() is therefore a numeric-string converter, not an English-language number parser. A label, currency name, unit, stray punctuation mark, or number-word phrase can still cause the formula to fail. Test the exact text produced by your source system rather than assuming that visually similar values will convert in the same way.
The conversion also does not rewrite the original record. If your organization must preserve the source wording for an audit trail, keep the original field unchanged and carry the converted digits in a separate staging or working field.
Build the text-to-number formula in Salesforce
Create the formula where you need a Number output, and follow the source field’s actual API name throughout the expression.
- Identify the source field. In Salesforce Setup, open Object Manager, choose the relevant object, and select Fields & Relationships. Confirm that the source is a Text field and note its API name. Custom fields commonly end in __c, while standard fields use their own standard names.
- Choose the formula’s destination. For a new formula field, select New, then Formula, and set the formula output type to Number. If the calculation already belongs in an existing Number formula, open that formula instead.
- Enter the core conversion. Start with VALUE(Text_Field__c). Replace Text_Field__c with the source field’s API name, preserving the capitalization and any required field suffix.
- Decide how blanks should behave. A blank-safe pattern is IF(ISBLANK(Text_Field__c), 0, VALUE(Text_Field__c)). The zero in this example is a business rule, not an automatic conversion. If a blank should produce another result, replace that fallback with the appropriate value.
- Test invalid values before saving. Salesforce returns an error when VALUE() encounters a text string it cannot convert. Check that the source field is not unexpectedly blank, contains labels or punctuation, or holds a phrase rather than digits.
- Save and verify downstream use. Save the formula, inspect records with valid and invalid source values, and then test the places where the numeric output will be used. A formula can appear valid in the editor while still failing on a particular record.
Worked example: from number words to a Salesforce number
Suppose the source phrase is “two hundred forty-six.” Enter only that phrase in the Words to Numbers Converter, select Convert to digits, and read the result 246. If the digit representation is stored in the Salesforce text field, the core formula VALUE("246") evaluates to the number 246. This is a manual preparation step: the browser converter is not called by the Salesforce formula itself.
Prepare spelled-out values before they reach Salesforce
The Words to Numbers Converter is appropriate only when the input is a clear English cardinal integer phrase. It accepts values from zero through the billion scale, including optional hyphens, the connector “and,” and a negative sign introduced by “minus” or “negative.” Its strict parser is useful because it returns an error instead of guessing at malformed wording.
- Copy only the English cardinal integer phrase into the converter. Remove surrounding labels, prose, units, and currency names.
- Select Convert to digits.
- Read the comma-formatted integer result.
- If an error appears, correct the highlighted grammar boundary or remove unsupported units, decimals, and surrounding prose.
- Use the resulting digits in the text field or source record that feeds the Salesforce formula. Do not overwrite the original phrase if your process requires an audit trail.
| Phrase or condition | Converter behavior | Action |
|---|---|---|
| Hyphenated or unhyphenated compounds | Accepted | Keep either familiar spelling. |
| “One hundred and five” | Accepted | The connector is permitted in familiar forms. |
| “One million million” | Rejected | Scale words must descend from billion to million to thousand. |
| “Zero five” | Rejected | Zero is valid alone but not inside a larger cardinal phrase. |
| Decimals, fractions, currency, ordinals, scientific notation, telephone-style digit strings, lakh or crore grouping, and non-English number systems | Rejected | Use a separate, explicit grammar for that format rather than forcing it into an integer converter. |
The supported integer range is negative 999,999,999,999 through positive 999,999,999,999. Within that range, hundred must follow a value from one through nine, and a tens word can be followed by only one unit. These are converter limits, not limits on Salesforce’s own number handling.
All parsing happens in the current browser tab. The converter does not upload, retain, translate, or send the phrase to a server. Its deterministic processing means the same valid phrase produces the same integer each time, while an invalid phrase produces a specific error. Its linguistic table follows Unicode LDML Part 3 rule-based number formatting, with additional checks against EF’s guide to numbers in English.
The converter displays a comma-formatted result. If a larger digit string must be evaluated by Salesforce, test the pasted representation in your org. If commas are confirmed to be thousands separators but VALUE() rejects them, store the plain digits or explicitly remove the commas with VALUE(SUBSTITUTE(Text_Field__c, ",", "")). Do not apply that cleanup to decimal commas or other locale-specific conventions without verifying the intended format.
Apply an explicit policy for blanks and invalid entries
A reliable formula depends on a reliable input contract. Define which representations are allowed in the source field, who is responsible for correcting them, and what downstream calculation should happen when a value is missing.
- Blank values: Use ISBLANK() when a missing record needs a defined fallback. Decide whether that fallback should be zero, another business value, or an error outside the formula.
- Non-numeric text: VALUE() cannot turn arbitrary prose into a number. Correct the source instead of assuming a plausible result will be produced.
- Number-word phrases: Convert them through the browser tool first when they meet its strict English cardinal-integer rules. For unsupported formats, define separate conversion rules.
- Separators and formatting: Store plain digits when possible or normalize only separators that have a confirmed meaning in your data.
- Original records: Keep the source text when traceability matters. Let the formula or a staging field carry the numeric representation.
Do not treat a successful conversion on one record as proof that every record will work. The strictest test set should include the formatting variants your users actually paste into the field, especially blanks, negative signs, inconsistent separators, and sentence fragments.
Test the conversion before it drives downstream work
Test the Salesforce formula with representative records before publishing it to production. Include a positive integer, a negative integer, zero, a blank, and a value that has passed through the number-word converter. Also include malformed text so administrators can see the expected failure rather than discovering it during a reporting cycle.
- Confirm that each valid digit string produces the intended numeric behavior in the Number formula field.
- Confirm that blank records follow the fallback policy you deliberately selected.
- Confirm that unsupported number-word phrases fail clearly and are handled by the preparation workflow.
- Check that negative signs, hyphens, and the connector “and” follow the converter’s documented rules.
- Verify any thousands-separator cleanup against actual source data rather than a hand-typed sample.
- Test the formula wherever its result feeds another formula, comparison, or operational process.
When the source contains financial, legal, or measured values, compare the converted result with the original source before using the number downstream. During speech transcription, also compare the written phrase with the recording: omitting a scale word can change a value by several orders of magnitude. The converter and VALUE() can make the representation numeric, but they cannot restore information that was absent or transcribed incorrectly in the original text.
For a deeper look, see BAC Calculator by Hour: Formula, Inputs, and Limits.
For a deeper look, see Chinese Gender Predictor Formula: Myth vs. Chart Lookup.