Dev.to WebDev 🛠 Dev 👁 2 📖 4 min read

The average said 10.5% of our emails were invalid. The median said 3.8%.

Disclosure first: I work at MailValid, an email verification API. At the start of December I pulled every verification result we returned in November to answer a question we get a lot: "what percentage of an email list i

The average said 10.5% of our emails were invalid. The median said 3.8%.

Disclosure first: I work at MailValid, an email verification API. At the start of December I pulled every verification result we returned in November to answer a question we get a lot: "what percentage of an email list is usually bad?"

The first number I got was wrong. Not wrong as in a bug, wrong as in misleading. This post is about why, and how to avoid the same mistake with your own list.

The data

  • 102,087 verification results, 1 to 30 November 2026
  • Internal and test accounts excluded
  • Every result is one of five statuses: valid, invalid, catch_all, unknown, do_not_mail

Pooled together, it looks like this:

Status Share
valid 61.9%
catch_all 11.5%
invalid 10.5%
unknown 9.2%
do_not_mail 7.0%

10.5% invalid. That's the number you'd put in a tweet. It's also not what a typical list looked like.

One list skewed the month

Two accounts produced 83% of all results. One of them had a 20.8% invalid rate across almost 37,000 results. That single list accounts for 72% of every invalid result in the month.

Remove it and the pooled invalid rate drops to 4.6%.

So I grouped by account instead. Fifteen accounts had at least 100 results:

Per account (n = 15) Median Min Max
invalid 3.8% 0.0% 20.8%
catch_all 12.1% 6.5% 57.6%
unknown 5.7% 0.0% 34.7%
do_not_mail 2.3% 0.1% 41.2%
valid 68.0% 35.2% 89.2%

MailValid results by account, November 2026

This is the classic pooled-mean problem: when group sizes are very uneven, the biggest group decides the average. The median account (3.8% invalid) is a much better answer to "what does a typical list look like?"

Caveats, because they matter:

  • These are lists people chose to verify, so they lean towards lists someone was worried about.
  • Several of the 15 accounts have only 100 to 150 results, so their percentages are rough.
  • These are result counts, not unique addresses.

Invalid isn't the only column that matters

The other thing the per-account view shows: a list can have almost no invalid addresses and still be a problem.

  • One account: 3.9% invalid, 57.6% catch_all. Over half the list can't be confirmed either way.
  • Another: 3.8% invalid, 34.7% unknown. A third of the mail servers didn't give a clear answer.
  • Another: 1.4% invalid, 41.2% do_not_mail (disposable, role-based like info@, or a past spam complaint).

If you only count bounces, all three look clean.

Run the same breakdown on your own list

The lesson carries straight over to a single company's list. If your list mixes sources (a webinar, a signup form, a purchased list from 2023), the pooled number hides which source is the problem. Group by source instead.

This script takes any CSV with a status column and, optionally, a column to group by:

import csv
import statistics
import sys
from collections import Counter, defaultdict

STATUSES = ["valid", "invalid", "catch_all", "unknown", "do_not_mail"]

path = sys.argv[1]
group_col = sys.argv[2] if len(sys.argv) > 2 else None

groups = defaultdict(Counter)
with open(path, newline="", encoding="utf-8") as f:
    for row in csv.DictReader(f):
        key = (row.get(group_col) or "(blank)") if group_col else "all rows"
        groups[key][row["status"]] += 1

def pct(counter, status):
    total = sum(counter.values())
    return 100 * counter[status] / total if total else 0.0

print(f"{'group':<20}{'rows':>7}" + "".join(f"{s:>13}" for s in STATUSES))
for key, c in sorted(groups.items(), key=lambda kv: -sum(kv[1].values())):
    print(f"{key[:19]:<20}{sum(c.values()):>7}" + "".join(f"{pct(c, s):>12.1f}%" for s in STATUSES))

if len(groups) > 1:
    pooled = sum(groups.values(), Counter())
    median = statistics.median(pct(c, "invalid") for c in groups.values())
    print(f"\nInvalid, pooled: {pct(pooled, 'invalid'):.1f}%   median group: {median:.1f}%")

Here it is on a made-up test file with three lead sources, one of them a bad purchased list:

$ python breakdown.py results.csv lead_source
group                  rows        valid      invalid    catch_all      unknown  do_not_mail
bought-list             900        37.1%        22.2%         8.7%        18.3%        13.7%
webinar                 400        79.5%         2.8%        12.5%         3.0%         2.2%
signup-form             300        84.3%         2.3%         7.7%         2.7%         3.0%

Invalid, pooled: 13.6%   median group: 2.8%

Same shape as our real data: one big bad source drags the pooled rate to 13.6% while the other sources sit under 3%. The fix isn't "clean the whole list harder", it's "stop importing from that source".

Getting a results file

Any verification tool that exports a status per address works with the script; you may need to rename the column to status. With MailValid, a bulk job's results download as CSV with email and status as the first two columns (API docs):

curl "https://mailvalid.io/api/v1/verify/bulk/$JOB_ID/download?format=csv" \
  -H "X-API-Key: $MAILVALID_API_KEY" -o results.csv

Then add your grouping column (lead source, signup month, campaign) by joining back to your original export on email.

What to do with each status

  • valid: send.
  • invalid: remove. These bounce.
  • catch_all: the domain accepts every address, so the mailbox can't be confirmed. Send carefully, in smaller batches, and watch bounces. More on how catch-all detection works.
  • do_not_mail: don't send marketing email. See which role-based addresses email platforms block.
  • unknown: retry later; the server didn't answer clearly. (On MailValid these cost nothing, which in November was 9,343 results.)

TL;DR

  • Pooled over 102,087 results: 10.5% invalid.
  • Median account: 3.8% invalid. One large list caused most of the difference.
  • When group sizes are uneven, report the median group, or at least show the groups.
  • Do the same with your own list: break it down by source before deciding what to clean.

If you run the script on your own list, I'd like to know whether the pooled and median numbers differ as much as ours did.

📰 Read the original article on Dev.to WebDev

Originally published by Dev.to WebDev. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.