Blog
Wild & Free Tools

Extract Domain from Email in Excel — The Formula Method and a Faster Alternative

Last updated: April 1, 2026 6 min read

Table of Contents

  1. The Excel MID + FIND formula
  2. Remove duplicates in Excel after extracting
  3. Excel Flash Fill method
  4. Using the browser-based domain extractor instead
  5. Google Sheets equivalent
  6. Frequently Asked Questions

You have a column of email addresses in Excel and you need to pull out the domain part — everything after the @ symbol. The long way is to write a formula. The longer way is to do it by hand. But there is also a third option: paste the whole column into a free browser tool and get a deduplicated, sorted domain list in one click.

This guide covers all three approaches. The formula method is good for staying inside Excel. The browser-based Domain Extractor is better when you want a clean output without maintaining a formula column.

The Excel Formula for Extracting Domains from Emails

The classic formula uses MID and FIND to extract everything after the @ symbol:

=MID(A2, FIND("@", A2) + 1, LEN(A2))

How it works:

For "[email protected]", this returns "acme.com". For "[email protected]", it returns "techcorp.io".

Put this in cell B2 and drag down to apply it to all rows. The result is a column of domain names, one per row.

Removing Duplicates from the Domain Column in Excel

The formula gives you one domain per row, including duplicates. If you have 300 rows with @gmail.com, you get 300 entries of "gmail.com" in your domain column. To collapse these into a unique list:

  1. Copy the domain column (B column or wherever your formula results are)
  2. Paste as values only (Paste Special > Values) into a new column or sheet
  3. Select that column
  4. Go to Data > Remove Duplicates
  5. Click OK

In newer versions of Excel (Microsoft 365), you can use the UNIQUE function to avoid the paste-as-values step:

=UNIQUE(MID(A2:A1000, FIND("@", A2:A1000) + 1, LEN(A2:A1000)))

This creates a dynamic array of unique domains. The UNIQUE function spills results automatically — no dragging needed.

One limitation of the Excel approach: it does not sort by frequency. You do not know how many contacts you have at each domain without adding a COUNTIF formula for each unique domain.

Sell Custom Apparel — We Handle Printing & Free Shipping

The Flash Fill Method — Faster Than a Formula

Flash Fill (introduced in Excel 2013) can extract domains without a formula at all. It learns from your example and fills the pattern automatically.

  1. In cell B2 (next to your first email in A2), type the domain manually. If A2 is "[email protected]", type "acme.com" in B2.
  2. Move to B3.
  3. Press Ctrl+E (Flash Fill shortcut) or go to Data > Flash Fill.

Excel fills the rest of the column by detecting the pattern. This usually works correctly, but Flash Fill can misfire on edge cases — especially if some emails in your list have unusual formats. Always scan the results for errors before using them.

Flash Fill does not deduplicate results, so you still need the Data > Remove Duplicates step if you want a unique list.

Why the Browser Tool Is Often Faster Than Excel

Both Excel methods have limitations: the formula method requires maintaining a helper column, handling errors for malformed emails, and running Remove Duplicates manually. Flash Fill is faster but can misfire. Neither method sorts by frequency.

The free Domain Extractor handles all of this in one step:

  1. Copy your email column from Excel
  2. Paste it into the Domain Extractor
  3. Click Extract Domains
  4. Get a deduplicated, sorted domain list with contact counts
  5. Download as CSV or copy back to Excel

The browser tool also filters out free email providers automatically. If your list has 400 Gmail addresses and 50 business domains, you get just the 50 business domains — sorted by how many contacts you have at each one.

Use Excel when you need the domains in a formula-linked column that updates as your data changes. Use the browser tool when you want a clean one-time output to work from.

Extracting Domains from Emails in Google Sheets

Google Sheets uses the same MID + FIND approach:

=MID(A2, FIND("@", A2) + 1, LEN(A2))

Google Sheets also supports UNIQUE:

=UNIQUE(MID(A2:A1000, FIND("@", A2:A1000) + 1, LEN(A2:A1000)))

For frequency counts (how many contacts per domain), use COUNTIF after extracting unique domains:

=COUNTIF($B$2:$B$1000, D2)

Where column D contains the unique domain list and column B contains all extracted domains (including duplicates).

If you would rather skip the formula maintenance entirely, the browser-based Domain Extractor works directly from Sheets — copy the email column, paste into the tool, get a sorted CSV output back.

Try It Free — No Signup Required

Runs 100% in your browser. No data is collected, stored, or sent anywhere.

Open Free Domain Extractor

Frequently Asked Questions

Why does the MID formula return an error for some emails?

The most common cause is a malformed email address that does not contain an @ symbol. FIND returns an error when it cannot find the character, which causes MID to error too. Wrap the formula in IFERROR to handle these: =IFERROR(MID(A2, FIND("@", A2) + 1, LEN(A2)), "invalid"). You can also use the free browser tool, which handles malformed emails gracefully by skipping them.

Can I sort the domain list by frequency in Excel?

Yes, but it requires an extra step. After extracting unique domains, use COUNTIF to count how many times each domain appears in the full extracted column, then sort descending by that count column. The browser-based Domain Extractor does this automatically — domains are pre-sorted by contact count in the output.

Does the formula work for subdomains like [email protected]?

The MID + FIND formula extracts everything after the @, so "[email protected]" returns "mail.company.com" — including the subdomain. If you want only the root domain (company.com), you need a more complex formula. The browser tool extracts the full domain as-is, same as the basic formula.

I have a CSV export, not an Excel file. What is the easiest approach?

For a CSV file, the browser tool is the fastest option. Go to the Domain Extractor, upload your CSV directly (or paste the email column), and download the result as a new CSV. No need to open the file in Excel first.

Zach Freeman
Zach Freeman Data Analysis & Visualization Writer

Zach has worked as a data analyst for six years, spending most of his time in spreadsheets, CSV files, and visualization tools. He makes data analysis accessible to people who didn't study statistics.

More articles by Zach →
Launch Your Own Clothing Brand — No Inventory, No Risk