Excel Formula to Extract Domain from Email Address
Free formula generator
Open Extract Domain formula generatorExtracting the domain part from email addresses is a common data preparation task in marketing and CRM work. Excel makes it easy with text functions.
Basic Formula: Extract Domain After @
=RIGHT(A2, LEN(A2)-FIND("@",A2))
Example: "john@example.com" → "example.com"
Excel 365: TEXTAFTER (Cleanest Method)
=TEXTAFTER(A2,"@")
Extracts everything after the @ symbol. Simple and readable.
Extract Domain Without TLD (e.g., "example" from "example.com")
=MID(A2, FIND("@",A2)+1, FIND(".",A2,FIND("@",A2))-FIND("@",A2)-1)
Gets the text between @ and the next dot.
Handle Missing @ Symbol
=IFERROR(RIGHT(A2, LEN(A2)-FIND("@",A2)), "Invalid email")
Extract for Multiple Emails (Array Use)
These formulas work for an entire column — just drag down from the first cell.
Count Emails by Domain
Once you've extracted domains, use COUNTIF:
=COUNTIF($B:$B, "gmail.com")
FAQ
How do I extract the domain from an email in Excel?
=RIGHT(A2, LEN(A2)-FIND("@",A2)) returns "example.com" from "user@example.com".
What Excel version has TEXTAFTER?
TEXTAFTER is available in Excel 365 (Microsoft 365 subscription) and Excel 2024.
How can I remove duplicate domains after extracting them?
Use our Remove Duplicates Tool or Data → Remove Duplicates in Excel.
Related: Extract Text Between Characters and Extract Last Name from Full Name.
📋 Related Formula Tools
Want to generate the formula directly? Try our free formula generators:
📬 Get Weekly Excel Tips
Join thousands of Excel users who receive our weekly formula tips, tricks, and productivity hacks.
Subscribe Free →📖 Continue Reading
How to Get First Word from Cell in Excel (3 Formulas Compared)
Learn 3 Excel formulas to extract the first word from a cell — LEFT+FIND for all versions, TEXTBEFORE for Excel 365. Step-by-step with examples.
How to Calculate Percentage Increase in Excel — Formula & Examples | SheetMaster
Master the Excel percentage increase formula in under 2 minutes. Step-by-step with real examples for sales growth, revenue tracking & YoY comparisons. Copy the formula, done.
Excel Formula to Find Duplicates in Two Columns (Step-by-Step)
Find duplicate values across two columns in Excel using COUNTIF, VLOOKUP, and conditional formatting. Includes formulas to highlight and extract duplicates.
Calculate Business Days Between Two Dates in Excel (NETWORKDAYS)
Use the NETWORKDAYS and NETWORKDAYS.INTL functions to calculate the number of business days between two dates in Excel. Includes examples and holiday handling.