Column Letter to Number Converter
| Letters | Number | Landmark |
|---|---|---|
| A | 1 | first column |
| Z | 26 | last single-letter column |
| AA | 27 | the roll-over - no zero here |
| AZ | 52 | end of the first A row |
| BA | 53 | the B row begins |
| ZZ | 702 | last two-letter column |
| AAA | 703 | into three letters |
| XFD | 16,384 | Excel 2007+ grid limit |
Spreadsheet columns are a counting system with a twist: A is 1, B is 2, Z is 26 - and then, instead of running out of digits the way base 26 would, the letters roll over into AA at 27. Every Excel user eventually meets the anchors: AB is 28, AZ is 52, ZZ is 702, AAA is 703, and XFD is 16384, the very last column a modern spreadsheet has. Type letters or a number above and the converter fills in the other live, in both directions.
The twist has a name: this is a bijective numeral system, base 26 with no zero digit. Ordinary base 26 would write twenty-seven as 11 (one twenty-six, one one); the column system writes it as AA because there is no column called A0 to bridge the gap - after Z comes a fresh left-hand letter, the same way a mechanical odometer with no zero would click from 9 to 11. That missing zero is exactly why AA is 27 and not 53, and why converting with a plain base-26 routine is the classic off-by-one bug.
How to use
- Type column letters (A to XFD, case does not matter) to see the number, or a number from 1 to 16384 to see the letters.
- Check the table for the landmarks: single letters end at Z=26, two-letter names end at ZZ=702, three-letter names end at XFD=16384.
- Take the Excel formula you need from the notes below the tool - both directions, spreadsheet-ready.
Frequently asked questions
What is the formula to convert a column letter to a number in Excel?
The one-shot formula: =COLUMN(INDIRECT(A1&"1")) - it builds a reference to row 1 of the column named in A1 and asks for its number, so AA returns 27. In Google Sheets the same formula works unchanged. If you just need the current column while writing a formula, =COLUMN() with no argument reports where you already are.
How do I convert a number back to column letters in Excel?
=SUBSTITUTE(ADDRESS(1, 27, 4), "1", "") returns AA: ADDRESS builds the cell text with the row number included (mode 4 means fully relative), and SUBSTITUTE strips the trailing 1, leaving the bare letters. The same formula converts 1 to A, 702 to ZZ and 16384 to XFD - change the 27 to any cell reference holding your number.
Why is AA 27 and not 53? Where did the zero go?
Because the system has no zero digit - it is called a bijective base-26 system. In ordinary base 26 the number twenty-six would be written 10 (one twenty-six, zero ones) and twenty-seven would be 11; the column system instead spends A through Z on 1 through 26 and only then adds a second letter, so AA means one full pass of 26 plus one more, 27. The trap is real: any conversion code that treats Z as digit 0 produces 26/27 off-by-one errors on every roll-over.
What is the last column in Excel?
XFD, column 16384 - two to the fourteenth power, the limit set when Excel 2007 expanded the grid from 256 columns (IV) to 16,384. Every column up to XFD is addressable; anything past it returns a reference error. The old 256-column ceiling is why some legacy files and VBA macros still stumble on modern sheets.
How do I get the column number in VBA?
For a letter: Columns("AA").Column returns 27. For a number: Split(Cells(1, 27).Address, "$")(1) returns "AA" - Cells builds the address and Split cuts off the dollar signs and row. Loop-friendly one-liner: Cells(1, N).EntireColumn.Select jumps straight to column N when N is a variable, no string conversion needed.