Sub topic 4
Calculating engagement rate and setting a baseline
This chapter assumes you can open a post's analytics page and read impressions, reactions, comments, reposts and clicks. It also assumes you are comfortable with percentages and simple averages. Here you will turn those raw counts into one comparable number, and then learn to judge that number against your own history instead of against someone else's.
Why a rate and not a count
A post with 60 reactions sounds better than a post with 40 reactions. That is only true if both posts were shown to the same number of people. If the first post had 6,000 impressions and the second had 800, the second post persuaded a much larger share of its viewers.
Engagement rate divides the engagement a post received by the number of times it was shown. This makes posts with very different reach comparable. It answers the question "of the people who saw this, how many did something?"
The definition used in this chapter
There is no single official formula. LinkedIn shows an engagement rate in some views, and third-party tools compute their own. The definitions differ in two places:
- The numerator. Some include only reactions, comments and reposts. Others also include clicks.
- The denominator. Most use impressions. Some use followers, or members reached.
This chapter uses one common definition:
engagement rate = (reactions + comments + reposts + clicks) / impressions
Whatever definition you pick, write it down and use it every time. A number computed two different ways is not comparable with itself.
Calculating it for one post
Open the post's analytics page and copy the five numbers. Then apply the formula.
def engagement_rate(impressions, reactions, comments, reposts, clicks):
"""One common definition: total engagements divided by impressions."""
if impressions == 0:
return 0.0
return (reactions + comments + reposts + clicks) / impressions
rate = engagement_rate(impressions=2000, reactions=60, comments=8, reposts=4, clicks=28)
print(f"{rate:.1%}") # 5.0%The function adds the four engagement counts (60 + 8 + 4 + 28 = 100) and divides by 2,000 impressions, which gives 0.05, or 5.0%.
The if impressions == 0 check matters. A brand-new post, or one that was never delivered, has zero impressions, and dividing by zero would crash the script. Returning 0.0 is a reasonable choice for a personal log. A stricter approach is to return None and skip the post, because a rate of 0% claims that people saw the post and ignored it, which is not what happened.
A worked example by hand
Suppose a post shows these numbers.
| Metric | Count |
|---|---|
| Impressions | 1,200 |
| Reactions | 40 |
| Comments | 6 |
| Reposts | 2 |
| Clicks | 6 |
Total engagements are 40 + 6 + 2 + 6 = 54. The rate is 54 / 1,200 = 0.045, or 4.5%.
Why a single rate misleads on its own
Is 4.5% good? The number has no meaning until you compare it with something. There are two obvious comparisons, and one is much better than the other.
- An outside benchmark. Articles often quote "typical" rates. These depend on the definition used, the industry, the account size and the post format, and you rarely know any of those. They are weak evidence about your account.
- Your own baseline. Your past posts share your audience, your definition and your habits. A change against your own baseline is far more informative.
Setting a baseline with the median
A baseline is the typical rate for your recent posts. You could use the mean (the average), but engagement rates are often skewed. One post that gets picked up widely can have a rate far above the rest, and it drags the mean up so that every ordinary post looks like a failure. The median is the middle value when you sort the rates, so one outlier barely moves it.
The next script computes each post's rate and compares it with the median of all of them.
from statistics import median
posts = [
{"name": "post_a", "impressions": 1200, "engagements": 54},
{"name": "post_b", "impressions": 3400, "engagements": 102},
{"name": "post_c", "impressions": 800, "engagements": 48},
{"name": "post_d", "impressions": 2100, "engagements": 63},
]
rates = {p["name"]: p["engagements"] / p["impressions"] for p in posts}
baseline = median(rates.values())
for name, rate in rates.items():
label = "above" if rate > baseline else "at or below"
print(f"{name}: {rate:.1%} ({label} median {baseline:.1%})")The rates are 4.5%, 3.0%, 6.0% and 3.0%. Sorted, they are 3.0%, 3.0%, 4.5%, 6.0%. With an even number of values, the median is the average of the two middle ones, (3.0% + 4.5%) / 2 = 3.75%. So post_a (4.5%) and post_c (6.0%) land above the baseline, while post_b and post_d (both 3.0%) land at or below it.
Notice that post_b had the most impressions and the most engagements in absolute terms, yet its rate is below the baseline. This is the main reason to use a rate.
Choosing which posts go into the baseline
A baseline is only as good as the posts you put in it. Use these rules.
- Use enough posts. With four posts the median is shaky. Aim for 10 or more where you can. If you have fewer, treat the baseline as a rough guide.
- Use recent posts. Your audience and habits change. Posts from two years ago describe a different account.
- Keep the formats comparable. Text posts, image posts, polls and documents behave differently. If you post several formats, compute a baseline for each, or at least do not mix a poll into a text-only baseline.
- Wait for the numbers to settle. Impressions keep accumulating for days after posting. Compare posts at the same age, for example seven days after publishing, so a post from yesterday is not judged against one from last month.
- Exclude paid promotion. Boosted posts reach people who did not choose to follow you, and their rates are not comparable with organic posts.
Edge cases and common errors
Small denominators
A post with 40 impressions and 4 engagements has a 10% rate. It looks excellent, but a handful of people produced it. One more or one fewer reaction changes the rate by 2.5 points. Rates from low-impression posts are noisy. Consider setting a minimum, such as 200 impressions, below which a post is logged but left out of the baseline.
Self-engagement and your own network
Your own comments, such as replying to people who commented on your post, may be counted as comments depending on the view. If you reply to every commenter, your comment count rises without any new reader doing anything. Be consistent about whether you count those replies, and note the choice in your log.
Clicks that are not content interest
A click may be a click on "see more" to expand a long post, a click on your profile, or a click on a link. These are different behaviors. Including all clicks is simple, but a post that merely requires expansion to read gets more clicks than a short one. If that distorts your comparisons, compute a second rate without clicks and compare the two.
Mixing definitions
If you calculate one post with clicks and the next without, the difference tells you nothing about the posts. Fix the formula before you start logging.
Treating the baseline as a target
The baseline describes what usually happens. A post below it is not a failure, because half your posts will fall at or below the median by construction. Look for patterns across several posts, not a verdict on one.
Reading results against the baseline
Once you have a baseline, compare new posts to it as a ratio or a difference.
| Post rate | Baseline | Reading |
|---|---|---|
| 6.0% | 3.75% | Clearly above typical, worth studying |
| 4.0% | 3.75% | Near typical, little to learn |
| 2.0% | 3.75% | Below typical, check reach and format before concluding |
Ask a follow-up question each time. If the rate is high, was the impression count unusually low, so that a small, loyal audience carried the number? If the rate is low, was the reach unusually high, so that the post reached many people who were less likely to engage? A high impression count often pulls the rate down because the post traveled beyond your core audience. That is not always bad. Later chapters cover how to read reach and rate together.
Summary of the method
- Pick one definition of engagement rate and write it down.
- Copy the counts from each post's analytics page at a consistent age.
- Compute the rate per post, skipping posts with very few impressions.
- Take the median of your recent, comparable posts as the baseline.
- Judge new posts against that baseline, and look for patterns over several posts.
Exercise
A post has 1,500 impressions, 45 reactions, 5 comments, 3 reposts and 17 clicks. Your last five organic posts have engagement rates of 3.2%, 4.8%, 2.6%, 5.1% and 3.9%. (a) What is the post's engagement rate under the definition in this chapter? (b) What is your baseline using the median? (c) Is the post above or below the baseline? (d) Give one reason you might hesitate to draw a firm conclusion.
Show answer
(a) Engagements are 45 + 5 + 3 + 17 = 70. The rate is 70 / 1,500 = 4.67%, about 4.7%. (b) Sorted, the rates are 2.6%, 3.2%, 3.9%, 4.8%, 5.1%. The median is the middle value, 3.9%. (c) 4.7% is above 3.9%, so the post is above your baseline. (d) The baseline has only five posts, so it is rough. The post is also only about 0.8 points above the median, which is within the spread of your recent posts (2.6% to 5.1%), so one post is not strong evidence of anything. You would also want to confirm the posts share a format and were measured at the same age.
Exercise
Explain why the median is usually a better baseline than the mean for engagement rates. Then show it with the values 3%, 3%, 4% and 15%.
Show answer
Engagement rates are skewed, because a single widely shared post can have a rate far above the rest. The mean is pulled toward that outlier, while the median depends only on the middle of the sorted values. For 3%, 3%, 4% and 15%, the mean is (3 + 3 + 4 + 15) / 4 = 6.25%, which is higher than three of the four posts, so it makes ordinary posts look weak. The median is (3 + 4) / 2 = 3.5%, which describes a typical post well.