This Excel column letter to number converter turns column letters such as AA or XFD into column numbers, and numbers back into letters, one or many at a time. It is for spreadsheet users, VBA and Apps Script writers, and developers working with libraries that address columns by index, who need the right number without counting across the sheet.
Runs entirely in your browser — nothing is uploaded. Accepts A to ZZZ and 1 to 18,278; Excel itself stops at XFD (16,384).
How the Excel Column Letter to Number Converter Works
Spreadsheet column names look like base 26, but there is a twist: there is no zero digit. A is 1, Z is 26, and the next column is AA rather than BA. Mathematicians call this bijective base-26 numbering. The Excel column letter to number converter reads each letter as a value from 1 to 26, multiplies the running total by 26 and adds the next letter. Going the other way, it subtracts one before each division so Z lands on 26 instead of rolling over.
Rule: Letters to number: start at 0; for each letter from left to right, total = total × 26 + (letter position, A = 1 … Z = 26). Number to letters: while n is above 0, set n = n − 1, take n mod 26 as the next letter from the right (0 = A), then set n = floor(n ÷ 26). So AA = 1 × 26 + 1 = 27, and XFD = 24 × 676 + 6 × 26 + 4 = 16,384.
- Column letters or numbers — one entry per line. Letters can be upper or lower case, and $ signs from absolute references are ignored. Numbers run from 1 to 18,278.
- Letters, Number — the first valid line, shown both ways.
- Formula cards — Excel and Google Sheets formulas that give the same answer inside a sheet.
- All results, Copy, Download, Clear — every line converted, ready to copy or save as a text file.
Example Scenarios
| Input | Output | Note |
|---|---|---|
| AA | 27 | First two-letter column |
| XFD | 16,384 | Last column in current Excel |
| 100 | CV | 3 × 26 + 22 |
| AZ | 52 | End of the A block |
| ZZ | 702 | Last two-letter column |
| AAA | 703 | First three-letter column |
Excel Column Number to Letter: Formulas and Tips
Inside a workbook you rarely need an external tool, but the formulas are easy to forget. For column letter to number, =COLUMN(AA1) returns 27. For Excel column number to letter, =SUBSTITUTE(ADDRESS(1,27,4),”1″,””) returns AA. Both work the same way in Google Sheets.
- Mind the limits. Excel has 16,384 columns, ending at XFD, while older .xls files stop at IV (256). Google Sheets documents a maximum of 18,278 columns, which is ZZZ.
- Watch for off-by-one errors in code. Many libraries count columns from 0, so column A is index 0 there but 1 in Excel. Adjust before using any Excel column index finder result in code.
- VBA can do it in one line: Range(“AA1”).Column returns 27, and Split(Cells(1, 27).Address, “$”)(1) returns AA.
- Do not treat letters as plain base 26. A naive conversion maps Z to 10 and breaks every column after Y.
Paste a whole list of headers, such as a mapping document, and the Excel column letter to number converter handles every line at once. For the maths behind numbering systems with no zero digit, see Wikipedia’s article on bijective numeration.
Excel Column Letter to Number Converter FAQ
What column number is AA?
Column AA is number 27. After Z, which is column 26, Excel starts two-letter names, so AA is 1 × 26 + 1. AB is 28, AZ is 52 and BA is 53. You can confirm it in any sheet with =COLUMN(AA1), which returns 27 in both Excel and Google Sheets.How do I convert a column number to a letter in Excel?
Use =SUBSTITUTE(ADDRESS(1,n,4),’1′,”) with straight double quotes around the 1 and the empty text, replacing n with your number. ADDRESS builds a relative reference such as AA1, and SUBSTITUTE strips the row number. The same formula works unchanged in Google Sheets, and you can fill it down a column of numbers.What is the last column in Excel?
Modern Excel, since the 2007 version, has 16,384 columns, and the last one is XFD. Older .xls workbooks were limited to 256 columns ending at IV. Opening a large .xlsx in older software can therefore cut off data, so check the column count if columns go missing.Is the Excel column letter to number converter free online?
Yes. It is free, needs no sign-up and runs entirely in your browser, so nothing you paste is uploaded. Convert one column or a whole list, mixing letters and numbers on separate lines, then copy the results or download them as a text file for your script or documentation.Can I do the conversion inside Excel itself?
Yes. =COLUMN(XFD1) returns 16384 for letters to numbers, and the SUBSTITUTE and ADDRESS formula goes the other way. In VBA, the Column property of a Range gives the number. This page is handy when you are writing code outside a spreadsheet or need many conversions at once without building helper formulas.Why is column Z not 25 or 10?
Spreadsheet columns use bijective base 26, where A to Z mean 1 to 26 and there is no zero. That is why Z is 26 and the next column is AA, not BA. Treating letters as ordinary base-26 digits starting at zero gives wrong answers for every column after Y.Related Tools
Column names are just another number base, like the ones in the binary to decimal converter. For a numbering system that also has no zero, try the Roman numeral converter for dates and lists, and the hex to RGB color converter for spreadsheet cell colours pairs well with the Excel column letter to number converter when you style reports.