How to extract the domain from an email address
✓ Verified in LibreOffice 25.8.7.3 ✓ Verified in Google Sheets (2026-08-30)Pull everything after the @ sign out of an email address.
The formula
| App | Formula | Notes |
|---|---|---|
| Excel (desktop) | =MID(A2,FIND("@",A2)+1,LEN(A2)) | FIND locates the @, MID takes everything after it. |
| Google Sheets | =MID(A2,FIND("@",A2)+1,LEN(A2)) | Identical. TEXTAFTER(A2,"@") also works in newer versions. |
| LibreOffice Calc | =MID(A2,FIND("@",A2)+1,LEN(A2)) | Identical. |
How it works
FIND("@",A2) returns the position of the @ sign. Adding 1 starts one character later, and MID pulls that many characters through the end of the string (LEN(A2) is a safe upper bound). For 'jane.doe@example.com' the result is 'example.com'.
Verified, not just documented
We ran =MID(A2,FIND("@",A2)+1,LEN(A2)) in LibreOffice 25.8.7.3 (headless, with forced recalculation) and it returned example.com — exactly the expected result. We then ran the same formulas in Google Sheets, executed 2026-08-30: a formula-only workbook goes into Google Drive, which converts it to a Sheet and recalculates every formula with Google’s own engine, and comes back out as .xlsx carrying the values Google computed. It returned example.com for the worked example, the same value LibreOffice produced. Both engines’ numbers on this page are executed results. The Excel formula follows Microsoft’s official documented syntax — we do not run desktop Excel.
Functions used
MID · FIND · LEN — see full Excel, Google Sheets & LibreOffice compatibility for each.
Related recipes
- How to extract the last name from a full name
- How to remove text before a character
- How to capitalize only the first letter (sentence case)
- How to extract numbers from text in a cell
- How to extract text between two characters