Google Sheets function · Text
TEXT in Google Sheets: syntax and examples
TEXT turns a number or a date into text using a format pattern. Use it to show fixed decimals, percentages, leading zeros or a date layout inside a longer string. The result is text, so you cannot do arithmetic on it.
Syntax
TEXT(number, format)
Arguments
| Argument | Type | Required | What it does |
|---|---|---|---|
number | number | yes | The number or date to format. |
format | text | yes | The format pattern as text, such as "0.00", "0%" or "yyyy-mm-dd". |
Examples
The examples use this table, starting in A1:
| Amount | Rate |
| 1234.5 | 0.256 |
| 7 | 0.5 |
| 0.05 | 1 |
=TEXT(A2, "#,##0.00")Result: 1,234.50
Thousands separator and two decimals.
Run in a Google Sheet (English US locale) on .
=TEXT(B2, "0%")Result: 26%
A fraction shown as a percentage.
Run in a Google Sheet (English US locale) on .
=TEXT(A3, "000")Result: 007
Pad a number with leading zeros, useful for codes.
Run in a Google Sheet (English US locale) on .
=TEXT(DATE(2026, 3, 5), "yyyy-mm-dd")Result: 2026-03-05
A date in a fixed sortable format.
Run in a Google Sheet (English US locale) on .
=TEXT(DATE(2026, 3, 5), "dddd")Result: Thursday
The weekday name. The language follows the locale of the file.
Run in a Google Sheet (English US locale) on .
Common errors
- The result is text: ISNUMBER(TEXT(A2,"0.00")) is FALSE. Keep the original number for calculations and use TEXT only for display.
- The format code does not follow the file locale. In a Romanian-locale file you still write "#,##0.00", and the output uses the local separators (1.234,50). A pattern typed with Romanian separators, "#.##0,00", turns 1234.5 into 1.234,5000.
- The pattern must be given as text, in quotes. A missing second argument returns #N/A.
- Text passed as the number is returned unchanged, with no error, which can hide a column that holds text instead of numbers.
Compared with Excel
Same idea as Excel TEXT. In Excel, some format codes change with the language of the installation. In Sheets the code stays as in en_US.
Questions and answers
Why does TEXT show a different weekday name in my file?
Names of days and months follow the locale set in the file. Change File, Settings, Locale to change the language of the output.