The tool you need, ready to use

Excel Column Letter to Number Converter

Type a column letter or a column number and the other box updates. A to Z are columns 1 to 26, the column after Z is AA (27), and Excel's last column, XFD, is number 16,384. It also reads cell addresses like AA10 and R1C1 addresses like R10C27, and below you get the position inside a table range plus COLUMN, ADDRESS, VBA and Python lines filled in for your column.

Last updated 2026-10-21All math stays in your browser

Common columns

Sheet headingsClick a heading or use the ← → keys to move one column

Place valuesEach letter: A = 1 … Z = 26, times 26 for every place

There is no letter for 0, so the column after Z (26) is AA (27), not BA.

Where it sits on the sheetLog scale, one band per letter count
  • Excel 97–2003 (.xls)Up to column IV (256), 65,536 rows
  • Excel 2007 and later (.xlsx)Up to column XFD (16,384), 1,048,576 rows

Formulas and codeFilled in with the column you picked

    Many at onceOne per line, or separated by tabs, commas or spaces. You can mix letters and numbers

    Example

    Last updated 2026-10-21Your inputs are not stored

    ROBERIN standardThe tool you need,
    ready to use.
    • Clear at a glanceInputs and results sit where you expect them.
    • Result firstThe key number comes first; the working only when you need it.
    • Ask lessNo sign-up and no unnecessary details.

    Column AA is number 27, and Excel's last column, XFD, is number 16,384

    Excel column letters run from A to Z (columns 1 to 26), then continue as AA, AB and so on with two letters, and from AAA with three. So A is column 1, Z is 26, AA is 27, ZZ is 702 and AAA is 703. Microsoft gives the size of an Excel worksheet as 1,048,576 rows by 16,384 columns, which makes XFD, the last column, number 16,384.

    The converter above keeps the column-letter box and the column-number box in step: type in either one and the other follows. It also reads cell addresses such as AA10 or $AA$10 and R1C1 addresses such as R10C27, and shows the row and the other notation next to the result. The sheet-heading strip shows the columns around your choice and, if you add a table range, the position you would give VLOOKUP. Further down you get formulas, VBA and Python filled in for the column you picked, and a box that converts a whole list in one go.

    When you need to switch between column letters and numbers

    • Giving VLOOKUP or INDEX a column number: the third argument of VLOOKUP, col_index_num, counts from the first column of the range you pass in, not from column A. Microsoft's own example: for B2:D11, B counts as 1 and C as 2. If your range starts at column C, column F is number 4, not 6, so you need the sheet's column number and the position inside the range, and they are different numbers.
    • Writing a macro in VBA: Cells(row, column) takes the column as a number. To point at AA10 you write Cells(10, 27). When a macro gives you a column number, you often have to turn it back into the letter a person would recognise.
    • Opening a workbook whose headings show numbers: with the R1C1 reference style on, Excel labels the columns 1, 2, 3 and writes addresses such as R10C27. If a colleague says "column 27", or you are sent a sheet full of addresses like that, you need to read them as column AA.
    • Reading or writing Excel files from code: openpyxl counts columns from 1, but pandas iloc and JavaScript arrays count from 0. The same column AA is 27 in one and 26 in the other, and if you do not match them you end up reading the column next to the one you wanted.
    • Saving as the old .xls format: Excel 97–2003 files stop at column IV, number 256. Microsoft's Compatibility Checker warns that data beyond 65,536 rows by 256 columns will not be saved, so check how far right your data goes before saving a wide sheet as .xls.

    How to use it

    1. Type a column letter in the left box or a column number in the right box. Lowercase aa and full-width AA are read as AA. The box you typed in is the source, and the other one follows it.
    2. You can paste a cell address as it is. AA10 and $AA$10 are read as column AA, row 10; R10C27 is read as row 10, column 27. The result line shows the same cell in the other notation.
    3. The "Sheet headings" strip shows your column and the ones beside it, the way Excel's grid does. The top line is the usual heading (A1 style), the bottom line the number you see in R1C1 style. Click a heading, or select the strip and press ← →, to move one column; PageUp and PageDown move 26.
    4. Enter a range such as B:F or B2:F100 in "Table range" and the strip shades it, then shows which position your column has inside that range, with a ready-made VLOOKUP formula.
    5. Under "Formulas and code", pick the Excel · Google Sheets, VBA or Python tab to get lines filled in for the current column. The button beside each line copies it.
    6. For a list, paste it into "Many at once". One per line or a row copied from Excel (tab-separated) both work: each item is converted in the same place and order. Anything that cannot be converted stays as ? and the line is named. "Copy as two columns" joins the original and the converted value with a tab, so they paste straight into two Excel columns.

    How it is calculated: base 26 with no zero

    1. Letter values: A = 1, B = 2, …, Z = 26. Ordinary base 26 would use 0 to 25, but column letters have no symbol for 0.
    2. Letters to number: starting from the left, repeat "running total × 26 + value of the next letter". For XFD, X = 24, F = 6 and D = 4, so (24 × 26 + 6) × 26 + 4 = 16,384. Written out by place value, that is 24 × 676 + 6 × 26 + 4 × 1 = 16,224 + 156 + 4.
    3. Number to letters: subtract 1 from the number and divide by 26. The remainder gives the right-most letter (remainder 0 = A, 25 = Z). Repeat with the quotient until it reaches 0. For 703: 702 ÷ 26 = 27 remainder 0 → A; 27 − 1 = 26 ÷ 26 = 1 remainder 0 → A; 1 − 1 = 0, remainder 0 → A, and the quotient is now 0. The answer is AAA.
    4. Why subtract 1: with no zero, Z (26) stays a single letter instead of rolling over to something like "10". The next column then adds a place and becomes AA (1 × 26 + 1 = 27). If you divide without subtracting 1, 26 splits into a leading A plus a zero digit that has no letter.
    5. How many columns per letter count: there are 26 one-letter columns and 26 × 26 = 676 two-letter columns (27 to 702). Three letters could give 26³ = 17,576 columns, but Excel stops at XFD, so only the 15,682 columns from 703 to 16,384 exist. The "Where it sits on the sheet" scale above shows these three bands on a log scale.

    Column letter and number reference tables

    One-letter columns (A–Z)
    ColumnNumberColumnNumberColumnNumberColumnNumber
    A1H8O15V22
    B2I9P16W23
    C3J10Q17X24
    D4K11R18Y25
    E5L12S19Z26
    F6M13T20
    G7N14U21
    First column of each two-letter block (first letter value × 26 + 1)
    ColumnNumberColumnNumberColumnNumberColumnNumber
    AA27HA209OA391VA573
    BA53IA235PA417WA599
    CA79JA261QA443XA625
    DA105KA287RA469YA651
    EA131LA313SA495ZA677
    FA157MA339TA521
    GA183NA365UA547
    Useful boundaries and large numbers
    ColumnNumberWhat it is
    Z26Last one-letter column
    AZ52Last column that starts with A
    CV100Column 100
    IV256Last column in Excel 97–2003 (.xls)
    IW257First column that .xls does not have
    ZZ702Last two-letter column
    AAA703First three-letter column
    ALL1,000Column 1,000
    NTP10,000Column 10,000
    XFD16,384Last column in Excel 2007 and later formats

    Column headings showing numbers: the R1C1 reference style

    If Excel shows 1, 2, 3 instead of A, B, C above the columns, and formulas look like =R2C3, the R1C1 reference style is switched on. It numbers both rows and columns, with R followed by the row number and C followed by the column number. Microsoft's formula overview says the style is useful for computing row and column positions in macros, and that when you record a macro, some commands are recorded in R1C1 style.

    • Turning it off in Excel for Windows: go to File > Options > Formulas and, under "Working with formulas", clear the "R1C1 reference style" check box.
    • Turning it off in Excel for Mac: on the Excel menu choose Preferences, then under "Formulas and Lists" choose Calculation, and clear "Use R1C1 reference style".
    • It only changes how addresses are shown: switching it on or off does not change any value or the cell a formula points to, only how headings and addresses are written.
    A1 style and R1C1 style
    A1 styleR1C1 styleMeaning
    $AA$10R10C27Cell in row 10, column 27 (AA), absolute
    $B$2R2C2Cell in row 2, column 2, absolute
    $C:$CC3The whole of column 3
    (relative to this cell)R[-2]CThe cell two rows up in the same column (relative)
    (relative to this cell)R[2]C[2]The cell two rows down and two columns right (relative)

    A relative reference with brackets, such as R[-2]C, depends on the cell that holds the formula, so it cannot be turned into an A1 address without knowing that cell. This converter only handles fixed addresses with plain numbers, like R10C27.

    Formulas for Excel, Google Sheets, VBA and Python

    Examples for column AA (number 27)
    What you wantFormula or codeResult
    Column letter → number=COLUMN(AA1)27
    Letter typed in cell A2 → number=COLUMN(INDIRECT(A2&"1"))27
    Number → column letter=SUBSTITUTE(ADDRESS(1,27,4),"1","")AA
    Row and column → A1 address=ADDRESS(10,27,4)AA10
    Row and column → R1C1 address=ADDRESS(10,27,1,FALSE)R10C27
    VBA: letter → numberRange("AA1").Column27
    VBA: number → letterSplit(Cells(1, 27).Address, "$")(1)AA
    Python (openpyxl): letter → numbercolumn_index_from_string("AA")27
    Python (openpyxl): number → letterget_column_letter(27)AA
    • COLUMN returns the column number of the cell you give it. The row number is irrelevant, so =COLUMN(AA100) is also 27. With empty parentheses, =COLUMN() gives the column of the cell holding the formula.
    • ADDRESS takes 4 as its third argument to mean relative row and column, so it builds "AA1" without any $ signs. Setting the fourth argument to FALSE builds an R1C1 address instead. Google Sheets' ADDRESS uses the same argument order and the same values (4 = relative row and column, FALSE = R1C1).
    • The SUBSTITUTE formula is correct only because the row is fixed at 1. With another row, such as =SUBSTITUTE(ADDRESS(21,27,4),"1",""), "AA21" loses its 1 and becomes "AA2", so always leave the row argument as 1.
    • In VBA, Range.Address returns an absolute reference such as "$AA$1" unless you say otherwise, so the second piece after splitting on $ is the column letter. Call Address(ReferenceStyle:=xlR1C1) to get R1C1 notation.
    • openpyxl counts from 1 in both functions. If you need a zero-based position, for example for pandas iloc, subtract 1: column AA becomes 26.

    Counting the column inside a table range (VLOOKUP and INDEX)

    The third argument of VLOOKUP is the position counted from the left-most column of the range. In Microsoft's example, if the range is B2:D11, B counts as 1 and C as 2. So the position is "number of the column you want − number of the range's first column + 1", and in Excel you can calculate it with =COLUMN(F1)-COLUMN(C1)+1. The column number you give INDEX is counted the same way.

    Position inside a range: worked examples
    Table rangeColumn wantedWorkingPosition
    C:FF6 − 3 + 14
    B2:D11C3 − 2 + 12
    Y:ADAA27 − 25 + 13
    A:ZZ26 − 1 + 126
    H:AKAF32 − 8 + 125

    Only when the range starts in column A is the position the same as the sheet's column number. If you insert or delete a column inside the range, a position you typed into VLOOKUP does not change by itself, so it is safer to calculate it with a COLUMN formula.

    Last column by program and file format

    Column and row limits (from the official documents)
    Program or formatLast columnColumnsRows
    Excel 2007 and later (.xlsx, .xlsm, .xlsb)XFD16,3841,048,576
    Excel 97–2003 (.xls)IV25665,536
    Google SheetsNo column limit in Google's help——

    Microsoft's compatibility page says that Excel 97–2003 is 65,536 rows by 256 columns and that data outside those limits is not saved. Google's Drive help gives the size limit for a spreadsheet as 20 million cells (or 100MB) and does not list a limit on columns. The converter works up to XFD (column 16,384), the Excel limit.

    Basis: Microsoft's "Excel specifications and limits" and compatibility pages and Google's Drive storage help, checked on 21 October 2026. How letters map to numbers is plain arithmetic and does not change.

    Common mistakes

    • Assuming BA comes after Z: thinking "9, then 10" makes BA feel natural, but the column after Z is AA. BA is column 53.
    • Passing the sheet's column number to VLOOKUP: with the range C:F, entering 6 for column F asks for the sixth column of a four-column range, and Microsoft says you get #REF! when the number is larger than the range is wide. With a wider range you may instead pick up the wrong column. The right value is 4.
    • Mixing in zero-based indexes: a 26 coming from code may really be AA, which is column 27. The result lines show the zero-based value as well, so you can see which one you have.
    • Changing the row in the SUBSTITUTE formula: if the first argument of ADDRESS is not 1, any 1 in the row number is stripped too, and you are left with the wrong letters.
    • Typing letter O or I as digit 0 or 1: column names do use O and I (IO is column 249). Typing the digit 0 or 1 instead gives a different column, or an address like "I0" that means row 0 and produces an error.

    Limitations

    • Only columns A to XFD (1 to 16,384) and rows 1 to 1,048,576 of an Excel worksheet are converted. For letters beyond that, such as XFE, the tool only tells you which number they would be and does not use it as a result.
    • Relative R1C1 references like R[-2]C, defined names and references to another sheet such as 'Sheet1'!A1 are not read. The table range box uses only the columns and ignores row numbers.
    • "Many at once" converts the column part of each item. A cell address like AA10 becomes column number 27, and R10C27 becomes column letter AA; the row is dropped.
    • The formulas on screen are written for Excel and Google Sheets with commas between arguments. If your copy of Excel uses semicolons there, replace the commas with ;.
    • Your input is worked out in your browser only and is not sent anywhere. "Copy link" puts the current values into the address.

    Sources

    Frequently asked questions

    What number is column AA in Excel?

    Column AA is number 27. A to Z are columns 1 to 26, and the column after Z is the first two-letter one, AA, so 26 + 1 = 27. AZ is column 52, BA is 53 and ZZ is 702.

    What is the last column in Excel, and what number is it?

    In Excel 2007 and later formats (.xlsx and so on) the last column is XFD, number 16,384. Microsoft lists a worksheet as 1,048,576 rows by 16,384 columns. The older Excel 97–2003 format (.xls) stops at column IV, number 256, and data further right is not saved in an .xls file.

    What Excel formula turns a column number into a letter?

    Use =SUBSTITUTE(ADDRESS(1,27,4),"1",""). ADDRESS(1,27,4) builds the relative address "AA1" for row 1, and SUBSTITUTE removes the 1, leaving "AA". Keep the row at 1: with row 21 you would get "AA21" and end up with "AA2". Google Sheets' ADDRESS takes the same arguments.

    What formula turns a column letter into a number?

    Put a reference to a cell in that column inside COLUMN: =COLUMN(AA1) returns 27. The row number does not affect the result. If the letters are typed as text in cell A2, use =COLUMN(INDIRECT(A2&"1")).

    My Excel column headings show numbers instead of letters. Why?

    The R1C1 reference style is switched on. In Excel for Windows go to File > Options > Formulas and, under "Working with formulas", clear the "R1C1 reference style" check box, and the headings go back to A, B, C. On a Mac, choose Excel > Preferences > Calculation and clear "Use R1C1 reference style". An address that reads R10C27 in this style is cell AA10.

    Why does the column after Z come out as AA and not BA?

    Column letters have no symbol for zero. A to Z stand for 1 to 26, so instead of writing "10" after 9 as in decimal, the next column adds a place and becomes AA (1 × 26 + 1 = 27). That is why, going from a number to letters, you subtract 1 and divide by 26 at each step.

    Is the column number VLOOKUP asks for the same as the number in this converter?

    Only if the range starts in column A. VLOOKUP's col_index_num is the position counted from the first column of the range you pass in, while this converter gives the position counted across the whole sheet. In the range C:F, column F is 6 − 3 + 1 = 4. Enter the range in the "Table range" box above and it works the position out for you.

    How do I convert in VBA or Python?

    In VBA, Range("AA1").Column returns 27 and Split(Cells(1, 27).Address, "$")(1) returns "AA". In Python with openpyxl, column_index_from_string("AA") returns 27 and get_column_letter(27) returns 'AA'. If you need a zero-based position, as with pandas iloc, subtract 1 and use 26.