Engagement rate is the number everyone quotes when they talk about a TikTok account, and it is also the number most often calculated two different ways without anyone noticing. If you are building a dashboard, a scraper report or a small calculator, the choice of denominator changes the answer more than anything else.
This post walks through the two common formulas, a small JavaScript implementation, and two sanity checks that catch bought engagement.
The two formulas
Both start the same way: add up the interactions on a video.
interactions = likes + comments + shares + saves
Then you divide by one of two things.
Engagement rate by views
ER(views) = interactions / views * 100
Engagement rate by followers
ER(followers) = interactions / followers * 100
They answer different questions. Per view tells you how people who actually saw the video reacted to it. Per follower tells you how much of the follower base is active. On TikTok, where videos are distributed one by one through the For You feed, the per-view number is usually the better signal of how content performs. The per-follower number is mostly useful for spotting a follower base that does not watch.
A worked example
A video has 20,000 views, 1,400 likes, 30 comments, 110 shares and 60 saves. The account has 80,000 followers.
- Interactions: 1,400 + 30 + 110 + 60 = 1,600
- By views: 1,600 / 20,000 * 100 = 8%
- By followers: 1,600 / 80,000 * 100 = 2%
Same video, same day, and one rate is four times the other. That is why two tools can disagree on the same account. Some also leave saves out entirely, which lowers the result again.
The JavaScript
function engagement({ views, followers, likes, comments, shares, saves = 0 }) {
const interactions = likes + comments + shares + saves;
const pct = (n, d) => (d > 0 ? +((n / d) * 100).toFixed(2) : null);
return {
interactions,
byViews: pct(interactions, views),
byFollowers: pct(interactions, followers),
// authenticity ratios, per 100 likes
commentsPer100Likes: pct(comments, likes),
sharesPer100Likes: pct(shares, likes),
};
}
console.log(engagement({
views: 20000, followers: 80000,
likes: 1400, comments: 30, shares: 110, saves: 60,
}));
// { interactions: 1600, byViews: 8, byFollowers: 2,
// commentsPer100Likes: 2.14, sharesPer100Likes: 7.86 }
The pct helper returns null instead of Infinity when a denominator is zero, which saves you from a broken chart the first time someone pastes in an empty row.
Use the median, not the average
One viral video will drag an average somewhere useless. If you are assessing an account rather than a single post, take the last 15 public videos and use the median of each field.
const median = (arr) => {
const s = [...arr].sort((a, b) => a - b);
const m = Math.floor(s.length / 2);
return s.length % 2 ? s[m] : (s[m - 1] + s[m]) / 2;
};
function accountEngagement(posts, followers) {
const pick = (k) => median(posts.map((p) => p[k] ?? 0));
return engagement({
views: pick("views"), followers,
likes: pick("likes"), comments: pick("comments"),
shares: pick("shares"), saves: pick("saves"),
});
}
Two ratios that catch bought engagement
Likes are the cheapest interaction to fake. Comments and shares are much harder. That is why the function above also returns comments and shares per 100 likes. If an account has huge like counts but almost no comments or shares, the likes deserve a closer look. A ratio far outside what similar accounts show is not proof of anything on its own, but it is a good reason to ask questions.
Try it without writing code
If you just want the numbers, we built a free TikTok engagement rate calculator that shows both rates side by side, plus the two authenticity ratios. The maths runs in the browser and nothing is sent anywhere.
One last caveat: engagement rate does not predict earnings. TikTok's Creator Rewards pays on qualified views of videos longer than a minute, and Shop Affiliate pays on sales. A strong engagement rate tells you the audience is healthy, not how much money the account will make.
Top comments (0)