Number to Excel Column Converter
Convert between Excel column numbers and column letters.
Column letter
A
Reference
| Number | Column |
|---|---|
| 1 | A |
| 26 | Z |
| 27 | AA |
| 52 | AZ |
| 53 | BA |
| 702 | ZZ |
| 703 | AAA |
| 16384 | XFD |
How Excel column naming works
Excel uses a base-26 bijective numeration for column names: A=1 through Z=26, then AA=27, AB=28, … AZ=52, BA=53, and so on. It differs from standard base-26 because there is no zero — each digit is 1-based. The maximum column in Excel is XFD (column 16,384). This converter is useful when writing spreadsheet formulas or automating Excel with scripts.
For base conversions between decimal, binary, hex, and octal see the Number Base Converter.
Built and maintained by Meet Shah · Last updated
What this tool is used for
- Working out which letter column a computed index corresponds to in a spreadsheet.
- Converting a column letter from a bug report into an index for code.
- Generating a cell reference programmatically for an export.
- Checking the boundary behaviour around Z and AA while writing a converter.
- Translating a column position from a library's zero-based index.
Frequently Asked Questions
- Why is this not just base 26?
- Because there is no zero digit. Excel columns are *bijective* base 26: A is 1 and Z is 26, and the next value is AA, not BA — where ordinary base 26 would write 10 with a zero. That missing zero is why the conversion needs a subtraction on each step.
- What is the last column?
- XFD, which is column 16,384 — the limit since Excel 2007. Before that, the grid stopped at IV (256). Google Sheets historically allowed more columns but caps the total cell count instead.
- Which columns catch people out?
- The boundaries: 26 is Z, 27 is AA, 52 is AZ, 53 is BA, 702 is ZZ and 703 is AAA. If a formula for this is off by one, those are the values that expose it — a naive base-26 conversion gets Z and AA wrong and everything else right.
- Where do I need the number rather than the letter?
- Anywhere the API is index-based: `Cells(row, col)` in VBA, `worksheet.cell(row, column)` in openpyxl, and most spreadsheet libraries. Converting by hand past a few dozen columns is where the off-by-one errors start.
- Are the letters case-sensitive?
- No — Excel accepts `a1` and normalises it to `A1`, and this converter upper-cases the input. Only the letters matter, so any surrounding row number or `$` absolute marker should be stripped first.
- Why does the arithmetic break down at column Z?
- Because the system has no zero digit — after Z comes AA, not BA or A0. It is bijective base 26, so the usual divide-and-remainder loop needs an adjustment at each step or it produces the wrong letters past 26.
Common errors and gotchas
- Treating it as base 26, which it is not — there is no zero digit, so AA follows Z rather than BA.
- Mixing zero-based and one-based indexing, where A is 1 in the spreadsheet and often 0 in code.
- Assuming two letters are always enough, when wide sheets reach three.
- Confusing the column letter with a named range or a table reference.
- Getting the boundary wrong at 26 and 27, which is exactly where a naive base conversion fails.
Related Converters tools
JSON to YAML
Convert JSON into clean, readable YAML instantly.
YAML to JSON
Convert YAML configuration into valid JSON.
JSON to XML
Convert JSON structures into nested XML markup.
HWB to HEX Converter
Convert an HWB color to HEX.
JSON to SQL
Turn a JSON array of objects into SQL INSERT statements.
CSV to XML
Convert CSV rows into structured XML records.
XML to CSV
Flatten repeated XML records into CSV rows.
INI to JSON
Parse INI config sections and keys into JSON.