The Twitter Algorithm: Taking a Look Under the Hood

Since taking ownership of Twitter in late October 2022, Elon Musk has given social media managers plenty of headaches and heartburn. But in a welcome change of pace, he recently followed through on a promise to release parts of the Twitter algorithm—the code that whittles away at the 10,000 tweets posted every second to assemble your Twitter timeline.

For social media nerds, like yours truly, it’s an exciting opportunity to look under the hood and see how the algorithm operates.

How Does It Work?

When I open my trusty bird app, I typically see a mix of cute animals, hockey news, and a smattering of thoughts from the 3,800+ people I follow, along with some content from users I don’t follow but Twitter thinks I might enjoy. Twitter’s process to assemble that timeline goes a little something like this:

  1. Fetch 1,500 of the best tweets from different recommendation sources, pulling from accounts I follow and those outside of my social graph
  2. Use a machine learning model to rank this subset of tweets, with scores for each tweet assigned based on the likelihood I’ll engage with it in a positive manner (with a like, retweet, or reply)
  3. Apply heuristics and filters to remove content like tweets from users I’ve blocked or tweets I’ve already seen and to include more content from a variety of authors
  4. Mix these selected and scored tweets with other elements like ads and follow recommendations and serve them up to me

According to Twitter, this all happens about 5 billion times every day, and one complete cycle takes less than 1.5 seconds.

OK, Nerd. So What?

Learning is its own reward, my friends, but let’s take this a step or two further. How can we give our tweets (or those of our clients) the best chance to show up when our target audiences refresh their feeds (after they hear the satisfying chirp sound Twitter added last year)?

Some of the code applied in step 2 of the timeline assembly process just makes sense. Tweets get a lower score when they:

  • Are written in a language you don’t use on Twitter
  • Include offensive language
  • Are no longer current, with the base score decreasing by 50% every 6 hours

Tweets get a higher score (and appear in more user timelines) when they:

  • Include an image or video (2x)
  • Are relevant to a trending topic (1.1x)
  • Come from a user you follow directly (4x)

Other elements in the code are a bit more surprising, like the fact that tweets with multiple hashtags are penalized. Or that of all of the forms of engagement, tweets get the biggest boost from likes.


Liking a tweet gives it a 30x boost, retweets add 20x, and replies—the form of engagement that requires the most effort—provide a relatively tiny bump (1x).

Another interesting element of the code gives a whopping 75x boost to accounts when a user replies to a post and the original author engages with the reply. It’s no secret that conversation with other users is one of the best ways to encourage audience growth, but even if the user doesn’t follow you or your brand, they’ll be much more likely to see your content in the future if you engage with their reply.

The code also gives us a look at the impact of Twitter Blue. Subscribers’ tweets get a 4x boost to appear in their followers’ timelines and a 2x boost to reach non-followers.

What Does This Mean for My Twitter Strategy?

This look under the hood at how Twitter creates our timelines shouldn’t dramatically shift your strategy on the platform, but you might want to consider some fine-tuning.

  • Given the 6-hour half-life for all tweets, you may want to post more frequently
  • When you write your content, consider how you might encourage likes and retweets rather than replies (unless you expect a large volume of replies, which could add up)
  • Include an image or video with each post (which has been an established best practice for many years)
  • Consider subscribing to Twitter Blue. Putting your tweets in front of your followers is probably one of your top social media goals, and the code shows the investment will give your tweets a better chance to reach that audience
  • Use paid campaigns when the content goal is to drive devalued actions. Content designed to drive website traffic or video views may need additional amplification because the weight of the main call to action (e.g., link click or video view) is lower than that of other actions

And finally, as always, test and learn. If there’s one hard-and-fast rule on social media, it’s that there are no solutions, approaches, or hacks that will work the same way for every account. Experiment with posting more frequently for a couple of weeks, for example, and see if it moves the needle.

Remember your goal isn’t to game the algorithm. It’s to tweak your strategy so the algorithm can easily spot your content and serve it to the people who will want to see it.


This article was orginally published on LinkedIn by Amanda Changuris, Director, Social Media. 

Like what you see?
let’s talk