Spreadsheet Column Converter — Excel/Sheets Column Letters ↔ Number

Convert a spreadsheet column label (A, B, … Z, AA, AB, …) to its column number and back, the way Excel and Google Sheets count columns. Two-way, live in your browser, with the bijective base-26 working shown step by step.

Converter Number Systems Updated Jun 21, 2026
How to Use
  1. Type a column label (like AA or XFD) into the Letters field — the column number updates instantly.
  2. Or type a column number (like 27) into the Number field — the letters update instantly.
  3. Lowercase letters are accepted; click any value or its Copy button to copy it.
  4. Open “Show work” to see the place-value breakdown of the conversion.
A, B … Z, AA, AB … XFD
1-based: A = 1, XFD = 16384

Excel column letters and numbers, both ways

Spreadsheets like Excel and Google Sheets name their columns with letters — A, B, all the way to Z, then they roll over to AA, AB, AZ, BA and so on. But many formulas and almost every spreadsheet programming library refer to columns by their 1-based number instead: A is column 1, Z is 26, AA is 27, and Excel’s final column XFD is column 16384. This tool converts between the two instantly, in either direction, entirely in your browser — type letters and read off the number, or type a number and read off the letters.

Why it’s “bijective” base-26

It is tempting to think of AA as “base-26 ten” — but it isn’t. In ordinary base-26 you would need a zero digit and would write A for both 1 and 27 only if there were a way to mean “one, zero”. Spreadsheet columns have no zero digit: there are exactly 26 symbols (A–Z) and every column maps to exactly one label, which makes this a bijective numeration in base 26. The practical effect is a small “off-by-one” at each digit. To go letters → number, give each letter its value (A=1 … Z=26) and accumulate left to right: n = n × 26 + value(letter). To go number → letters, you must subtract one before each step: n − 1, take n mod 26 as a letter (0→A … 25→Z), set n = ⌊n ÷ 26⌋, and repeat, reading the letters in reverse. That single decrement is the whole trick.

A worked example: column 1024

Take number 1024. Subtract 1 → 1023; 1023 mod 26 = 9 → the 10th letter J, and ⌊1023 ÷ 26⌋ = 39. Subtract 1 → 38; 38 mod 26 = 12M, and ⌊38 ÷ 26⌋ = 1. Subtract 1 → 0; 0 mod 26 = 0A, and ⌊0 ÷ 26⌋ = 0, so we stop. Reading the letters bottom-to-top gives AMJ. Checking the other direction: A=1 → 1×26+13 (M) = 3939×26+10 (J) = 1024. The “Show work” panel above runs exactly these steps for whatever you type.

Quick reference

A · Z
= 1 · 26
AA · AZ
= 27 · 52
BA · ZZ
= 53 · 702
AAA · XFD
= 703 · 16384 (Excel max)
Letters → number
n = n × 26 + value(L)
Number → letters
n−1, L = n mod 26, n ÷= 26

About the Spreadsheet Column Converter — Excel/Sheets Column Letters ↔ Number

Use the Spreadsheet Column Converter — Excel/Sheets Column Letters ↔ Number — a free, easy tool for everyday tasks. Nothing is uploaded, and you do not need an account. Convert a spreadsheet column label (A, B, … Z, AA, AB, …) to its column number and back, the way Excel and Google Sheets count columns. Two-way, live in your browser, with the bijective base-26 working shown step by step.

How it works

Enter a number and choose your units — the converted value shows instantly. Everything runs locally, so nothing you type leaves your device. Double-check the direction of the conversion and you are set.

Want the deeper story? The Knowledge Base explains the ideas behind the tools in more detail.

Frequently Asked Questions

What is a spreadsheet column number?

Spreadsheets label columns with letters (A, B, … Z) and then double them up (AA, AB, … AZ, BA, …). The column number is the 1-based position of that label: A is column 1, Z is 26, AA is 27, and Excel’s last column, XFD, is 16384.

Why isn’t this just normal base-26?

Ordinary base-26 has a zero digit, so it would need 27 distinct symbols for the digits 0–26. Spreadsheet columns use only the 26 letters A–Z with no zero, which makes this a <em>bijective</em> base-26 (also called base-26 without a zero). That is why AA = 27 rather than 0, and why the conversion needs a small “subtract one” adjustment at each step.

How do I convert column letters to a number by hand?

Treat A=1 … Z=26 and run a running total: start at 0, and for each letter from left to right do total = total × 26 + value. For AB that is (0×26 + 1) = 1, then (1×26 + 2) = 28. So AB is column 28.

How do I convert a number back to letters?

Repeatedly subtract 1, take the remainder mod 26 as a letter (0→A … 25→Z), then divide by 26, until the number reaches zero — reading the letters in reverse. For 27: 27−1=26, 26 mod 26 = 0 → A, 26÷26 = 1; 1−1=0, 0 mod 26 = 0 → A, done → AA.

Is anything uploaded?

No. The conversion runs entirely in your browser with JavaScript — nothing is sent to a server.

How do I use the Spreadsheet Column Converter — Excel/Sheets Column Letters ↔ Number?

Simply type or paste your value and read the result, which refreshes the instant you change something. There is nothing to submit and nothing to wait for.

Do I need to install or sign up for anything?

Not at all — it runs in the browser with nothing to install and no account. After it loads once, it even works without an internet connection.

Is my information private?

Yes. Everything happens in your browser. Nothing you type is sent to a server or saved anywhere.

Common Use Cases

Writing spreadsheet formulas

Functions like INDEX, OFFSET, ADDRESS and MATCH return or take a column <em>number</em>; this tool tells you which letter that is (and vice versa).

Coding against spreadsheets

Libraries such as openpyxl, SheetJS or the Google Sheets API often index columns by number — convert between the A1-style letter and the 1-based index quickly.

Reading wide sheets

Figure out exactly how far across a column like BX or AMJ sits without counting cells by hand.

Learning bijective bases

A clean, real-world example of a numeral system that has no zero digit, with the arithmetic spelled out.

Last updated: