Sub topic 12
A/B Testing a Subject Line or Content
This chapter assumes you can build and send a campaign in an email platform and that you know what a segment and a seed list are. You should also have the test-send habits from earlier chapters. An A/B test is not a substitute for those checks. It is a way to learn which of two valid versions works better, using a slice of your real audience.
What an A/B test is for
An A/B test sends two versions of a campaign (A and B) to two random, equal-sized groups drawn from the same audience. You compare one outcome metric and, if the difference is real, send the better version to everyone else.
An A/B test answers a question such as "Does a question in the subject line get more opens than a statement?" It does not catch broken links, empty merge tags or a missing unsubscribe link. Both versions can contain the same mistake, and half your test group will receive it. Run every pre-send check on both variants before the test starts.
The test also has a limit on what it can tell you. It measures the difference between two versions for this audience at this moment. It does not show that a style always wins.
Choose one variable
Change one thing between A and B. If you change the subject line and the hero image together, a difference in clicks cannot be assigned to either change.
Common variables:
| Variable | Typical metric | Notes |
|---|---|---|
| Subject line | Open rate | Most common test. Keep the body identical. |
| Preheader | Open rate | Often tested together with the subject line. Treat that as one variable only if you say so in your hypothesis. |
| From name | Open rate | For example a brand name against a person's name. |
| Call-to-action wording or button | Click rate | The body of the email must otherwise match. |
| Layout or hero image | Click rate | Needs a larger sample than subject-line tests. |
| Send time | Open or click rate | Both versions must have identical content. |
Write the hypothesis before you set up the test. For example: "Adding the discount amount to the subject line will raise the open rate, because readers can see the value before opening." A hypothesis written afterwards tends to match whatever the data shows.
Choose the metric before you start
Pick one primary metric and decide on it in advance.
- Open rate suits subject lines, preheaders and from names. Treat it with caution. Many mail clients preload images, which registers an open even if the person never read the message. That inflates open counts and adds noise to the comparison. Both variants are affected, so a comparison is still useful, but the absolute numbers are not reliable.
- Click rate (unique clicks divided by delivered messages) suits content and call-to-action tests. It is less affected by image preloading, although some security scanners also follow links automatically.
- Conversion or revenue is the best metric for business impact. It needs working tracking parameters and enough volume, which is why the link checks from the previous chapters matter here.
If you watch five metrics and announce whichever one favors your preferred version, you will find a "winner" by chance. Choose one primary metric and treat the others as context.
Check that the sample is big enough
Small samples produce differences that disappear on the next send. Suppose 500 people receive each version, and A gets 100 opens (20%) while B gets 110 (22%). That gap is well within what random variation produces, so you cannot conclude B is better.
Rules of thumb:
- The smaller the difference you hope to detect, the more recipients you need. Detecting a 1 percentage point change in a 20% open rate takes thousands of recipients per version. Detecting a 5 point change takes far fewer.
- Many platforms suggest 1,000 or more recipients per variant for subject-line tests. Treat that as a floor, not a guarantee.
- If your list is small, test bigger changes, or skip the formal test and use what you learn from repeated sends.
You can estimate the sample size yourself. The following script uses the standard two-proportion formula at 95% confidence and 80% power.
import math
def sample_size_per_variant(baseline, lift, z_alpha=1.96, z_beta=0.84):
"""Recipients needed per variant to detect an absolute change of `lift`
from a `baseline` rate (both as fractions, e.g. 0.20 and 0.02)."""
p1 = baseline
p2 = baseline + lift
p_bar = (p1 + p2) / 2
numerator = (
z_alpha * math.sqrt(2 * p_bar * (1 - p_bar))
+ z_beta * math.sqrt(p1 * (1 - p1) + p2 * (1 - p2))
) ** 2
return math.ceil(numerator / (lift ** 2))
for lift in (0.01, 0.02, 0.05):
n = sample_size_per_variant(0.20, lift)
print(f"Baseline 20%, detect +{lift * 100:.0f} points: {n} per variant")For a 20% baseline the script reports roughly 25,000 per variant for a 1 point lift, about 6,500 for 2 points and about 1,100 for 5 points. Your platform's built-in calculator may use different assumptions, but the pattern holds: small lifts need large samples.
Split the audience correctly
The split must be random. If A goes to the first half of an alphabetical list and B to the second half, you are comparing different kinds of people, not different subject lines. Let the platform randomize, and avoid hand-built groups.
Two designs are common.
- Fixed split, no winner rollout. Send A to half the list and B to the other half. You learn something for future campaigns, but the whole audience gets a mix of versions.
- Test slice and winner rollout. Send A and B to a small portion (for example 10% each), wait, then send the winning version to the remaining 80%. This improves the current campaign and the test result.
The second design couples to the staged send covered in the next chapter. It also has a cost: the rollout happens before the test has gathered a full picture. Both limits matter below.
Set the test window
Decide how long to wait before choosing a winner. Opens arrive quickly for some audiences and slowly for others. If you declare a winner after one hour, you favor the version that suits people who check email immediately.
- Look at your past campaigns to see when most opens and clicks arrive. Often the majority arrive within 24 hours.
- For a rollout test, a window of at least a few hours is common, and a full day is safer for click-based tests.
- Set a default version in case the platform finds no clear winner. Otherwise the remaining audience may receive nothing or an arbitrary choice.
If you send to several time zones, a short window mixes morning readers with people who are asleep. That is a good reason to lengthen the window.
Read the result without fooling yourself
When the test ends, check three things before you act on it.
- Is the difference larger than chance? Many platforms report a confidence level. A common threshold is 95%. If your platform does not report one, a two-proportion z-test gives you the same answer.
- Is the difference large enough to matter? A statistically reliable gain of 0.1 points may not justify extra work.
- Did anything else differ? Check that both versions went out at the same time, to randomly selected groups, with the same links and footer.
Here is a small check you can run on the raw counts.
import math
def two_proportion_z(success_a, total_a, success_b, total_b):
p_a = success_a / total_a
p_b = success_b / total_b
pooled = (success_a + success_b) / (total_a + total_b)
se = math.sqrt(pooled * (1 - pooled) * (1 / total_a + 1 / total_b))
return (p_b - p_a) / se
z = two_proportion_z(success_a=2000, total_a=10000, success_b=2150, total_b=10000)
print(f"z = {z:.2f}")
print("Likely a real difference" if abs(z) > 1.96 else "Could be chance")With 20.0% against 21.5% on 10,000 recipients each, z is about 2.6, so the difference is unlikely to be chance. Run the same function on 500 recipients per version with the same rates and z falls to about 0.6.
Common mistakes
- Testing several changes at once. You cannot tell which one mattered.
- Declaring a winner too soon. See the warning above.
- Ignoring the audience. A result from loyal customers may not hold for new subscribers. Do not generalize beyond the group tested.
- Testing a subject line that misleads. A subject line promising something the email does not deliver can win on opens and lose on complaints and unsubscribes. Check complaint and unsubscribe rates for both variants, as they affect deliverability later.
- Breaking personalization in one variant. If B uses a merge tag in the subject and the fallback value is missing, some recipients see an empty name. Test both variants with seed contacts whose fields are empty.
- Forgetting tracking. Both versions need the same
utm_sourceandutm_mediumvalues, and a distinctutm_contentor similar value if you want to compare results in your analytics tool. - Repeated tests on the same people. If you always test on the same subscribers, they may stop being representative or get fatigued.
Keep a test log
Record each test: the hypothesis, the variants, the audience, the sample size, the metric, the window, the result and the decision. After a dozen tests you will see which findings repeat. A single result is a hint, and a result that repeats across campaigns is something you can rely on.
A simple log needs only these columns:
| Date | Hypothesis | Variable | Metric | Sample per variant | Result | Decision |
|---|---|---|---|---|---|---|
| 2026-11-12 | Discount in subject raises opens | Subject line | Open rate | 5,000 | B +1.8 points, 96% confidence | Use amounts in sales subject lines |
When not to run an A/B test
Skip the test when the list is too small to reach a meaningful sample, when there is no time to wait for a result, or when the two versions differ for legitimate reasons, such as separate offers for separate segments. In those cases, rely on content review and test sends, and use a staged send to limit the damage of any problem.
Exercise
Your list has 4,000 subscribers. You want to test whether a shorter subject line raises open rate, and you plan to send version A to 10% and version B to 10%, then send the winner to the other 80% after two hours. Name two problems with this plan and a change that addresses each.
Show answer
First, each test group has only 400 recipients, which is too small to detect anything but a very large difference, so the "winner" is likely chance. Raise the test share (for example 50% per variant with no rollout), or accept that the result is only a hint. Second, two hours is too short, because it favors people who read email right away and misses later readers. Extend the window to a day, or at least to cover the period when most opens usually arrive. Also set a default version in case no clear winner appears.
Exercise
A test of two email bodies shows B with a higher click rate. Before rolling B out, which three things do you check?
Show answer
Check that the difference is statistically reliable and large enough to matter, using the confidence level or a z-test. Check that only one thing differed between A and B and that both used the same send time, randomized groups, working links and the same footer. Check the secondary signals, namely unsubscribe and complaint rates, to make sure B did not win clicks by misleading readers.