Part 1: How the algorithm works
The 2-Minute Explanation
Let’s say you’re an average Twitter user named Bill.
Twitter makes money when it shows you ads. The more ads you watch, the more money Twitter makes. It’s trying to get you to spend as much time on the app, so that you watch more ads.
The algorithm’s job is to show you content that will make you spend more time on the app.
To show you content that’ll make you spend more time on the app, it tries to guess:
“What type of content is Bill most likely to engage with?”
“What is trending among users that have similar tastes as Bill?”
The Algorithm is basically Twitter’s way of making an educated guess about these questions. It does so in 3 steps:
1) It guesses which 1500 tweets you will most like from the 100 million tweets on the platform.
2) It gives each tweet an ‘engagement probability score’ and ranks them from best to worst. The top tweets are the ones you’ll most likely engage with.
3) It cleans up the tweet list by removing misinformation, blocked accounts etc. shows you the tweets with the highest score first, and throws in an ad for every 2-3 tweets.
After going through these 3 steps, what Twitter shows you is called the Twitter Feed.
Understanding how it picks, ranks, and filters tweets can help you write content reaching millions of people.
✅ Boost Your Twitter Game with Tweet Hunter!
The 15-Minute In-Depth Explanation
We want to understand how the algorithm finds relevant tweets, ranks them and what it filters out. The technical terms for these steps are:
1) Candidate Sourcing (Picking Tweets)
2) Ranking System
3) Heuristics and Filtering
Let’s break this down.

Twitter uses three types of data points:
- The follower graph indicating who follows you
- Engagement data such as likes, retweets, and replies
- User data such as mutes, unfollows, and spam reports
This data is used to source relevant tweets, which is also called candidate sourcing.

Candidate Sourcing
Twitter attempts to extract the best 1500 Tweets from a pool of hundreds of millions of through candidate sources.
This includes:
- People you follow (In-Network) - (Roughly 50% or 750 tweets come from here)
- In-Network source uses a complex logistic regression model to filter out irrelevant tweets and carefully curate the most important and timely messages from the users you follow.
- This happens through is Real Graph. It predicts the likelihood of two users engaging. Higher the score, likely they are to be seen on your feed.
Twitter RealGraph Framework - The top tweets go to the next level.
- People you don’t follow (Out-of-Network) - (Roughly 50% or 750 tweets come from here)
How can we tell if a certain Tweet will be relevant to you if you don’t follow the author?
There are 2 approaches to this taken up by Twitter.
- Social graph
These currently serve about 15% of Home Timeline Tweets.
For this, 2 things are taken into consideration.
What Tweets did the people I follow recently engaged with?
Who likes similar Tweets to me, and what else have they recently liked?
The tweets resulting to this are then ranked using a logistic regression model - GraphJet, a graph processing engine that maintains a real-time interaction graph between users and Tweets.
Overall architecture of the “Who to Follow” user recommendation service - Embedding spaces
This works on content similarities.
What Tweets and Users are similar to your interests?
This is done with the help of embeddings. Embeddings work by generating numerical representations of users’ interests and Tweets’ content.
Next I’m buying Coca-Cola to put the cocaine back in
— Elon Musk (@elonmusk) April 28, 2022We can then calculate the similarity between the above tweet and a users interest using the following:
- Any two users (In our example, Sam Altman’s followers seeing Elon Musk’s tweet)
- Any two tweets (Accounts following the news of company acquisitions seeing Elon Musk’s tweet)
- User-tweet pairs (People following Coca-Cola seeing this tweet)
One of Twitter’s most useful embedding spaces is SimClusters.
SimClusters discover communities anchored by a cluster of influential users using a custom matrix factorization algorithm.
- In simple words, the algorithm uses your content to categorize you with other similar users and creates clusters. This helps your tweets reach those who aren't already following you.
- There are 145k communities, which are updated every three weeks. Users and Tweets are represented in the space of communities, and can belong to multiple communities. Communities range in size from a few thousand users for individual friend groups, to hundreds of millions of users for news or pop culture.
The more users from a community like a Tweet, the more that Tweet will be associated with that community. These tweets are ranked after this.
At the sourcing stage, Twitter rewards great engagement with great reach and vice versa.
- Social graph
Ranking System

At this point, we have 1500 candidates which are probably relevant. Scoring these directly predicts the relevance of each candidate Tweet and is the primary signal for ranking Tweets on the timeline.
💡 Reach = f (likes, retweets, replies, images, videos, profile tap, twitter blue, account reputation, new words, unknown language, links, misinformation, hashtags, type of writing, etc)
These variables contribute your tweet’s ranking positively and negatively and eventually decides wether your tweet will be chosen in the top 1500 tweets or not.
Actions | Sentiment | Weight |
Likes | Positive | 30x |
Retweets | Positive | 20x |
Replies | Positive | 1x |
Image & video | Positive | 2x |
Twitter Blue verified | Positive | 2x |
Good account reputation (calculated by follower ratio, usage, verification, if you've been banned before | Positive | Boosted |
New words or unknown language | Negative | 0.01x |
Links (Unless you have good engagement) | Negative | Negative ranking |
Misinformation | Negative | Negative ranking |
Multiple hashtags | Negative | Negative ranking |
Type of writing | Negative | Negative ranking |
Interacting with low quality account and blacklisted topics | Negative | Negative ranking |
Request "show less often" on your Tweet/you, block/mute you, reports | Negative | You’re screwed |
After this, in each user’s feed, based on the actions they are likely to take on that tweet, these tweets are served in an order that is most likely to maximise retention.
It calculates the probability of you taking a user action and assigns a weight to it. For eg: the probability of some replying to your tweet matters 54x times the the probability of someone liking it.
User Action | Sentiment | Weight |
Like your tweet | Positive | 0.5 |
Retweet your tweet | Positive | 1 |
Click into your tweet & reply/like a tweet or stay there for >2 mins | Positive | 11 |
Check out your profile and like/reply to a tweet | Positive | 12 |
Reply to your tweet | Positive | 27 |
Reply to your tweet and you engage with this reply | Positive | 75 |
Request "show less often" on your Tweet/you, block or mute you | Negative | -74 |
Report your Tweet | Negative | -369 |
This means that,
- When someone clicks on my tweet and stays there for more than two minutes, it is weighted 22 times more than if they had just liked my tweet.
- If they click into my profile through my tweet and like or reply to a tweet, it is 24 times more than a like.
- When they reply to my tweet, it is 54 times more than a like.
- If they reply to my tweet and I respond to their reply, it is 150 times more than a like.
- However, if someone reports my tweet, it has 738 times the effect of a like, meaning I'm basically screwed.
Filtering and Heuristics
After ranking tweets, Heuristics & Filters are used in order to create a balanced and diverse field.
Some examples:
- Visibility Filtering: Customise your feed by hiding tweets from blocked or muted accounts.
- Author Diversity: Prevent seeing too many tweets in a row from the same person.
- Content Balance: Show a mix of tweets from people you follow and others outside your network.
- Feedback-based Fatigue: Reduce visibility of tweets that have received negative feedback from you.
- Social Proof: Only show tweets from outside your network if someone you follow has interacted with them.
- Conversations: Add context to reply tweets by connecting them to the original tweet.
- Edited Tweets: Keep your feed fresh by replacing outdated tweets with their updated versions.

At this point, Home Mixer has finished preparing a series of Tweets to be sent to your device.
The system also weaves in additional content like ads, follow recommendations, and onboarding prompts, creating a seamless user experience.

Once complete, this content is returned to your device for display.
Appendix: References from Source Code
Engagement
Likes > Retweets > Replies
Aim for likes, ask for retweets & keep replies as the last priority.
- 1 like gives a 30x boost
- 1 retweet gives a 20x boost
- 1 reply gives 1x boost
💡 Retweets may be ranked lower than likes but it also multiplies your reach which may give better likes in return

User Actions that matter
User Action | Sentiment | Weight |
Like your tweet | Positive | 0.5 |
Retweet your tweet | Positive | 1 |
Click into your tweet & reply/like a tweet or stay there for >2 mins | Positive | 11 |
Check out your profile and like/reply to a tweet | Positive | 12 |
Reply to your tweet | Positive | 27 |
Reply to your tweet and you engage with this reply | Positive | 75 |
Request "show less often" on your Tweet/you, block or mute you | Negative | -74 |
Report your Tweet | Negative | -369 |

Images & videos:
- Adding images and videos gives a 2x boost
- This means that if you want your tweets to reach a wider audience, it's essential to include visual content. But don't just add any image or video, make sure it is high-quality and relevant to your tweet.

Following to follower ratio make a difference?
- Your account reach gets affected negatively if your following is more than 60% of your followers.
- For instance, if you have 1000 followers and follow 800 people, try unfollowing 200 accounts to gain a better reach.
(Mass unfollowing people also gets you shadowbanned so don’t just go and unfollow everyone suddenly)

Does Twitter Blue matter?
- Twitter blue extends your reach on top of other benefits given with it like ranking boost in replies and searches, half of the ads in your timeline, posting longer videos and 1080p videos, editing tweets, bookmark folders, and early access to new features.

How do you show up in ‘For you’ tab?
Increase your chances of getting on the "For You" tab by considering these factors:
- Tweet content that leads to likes/RTs
- Write tweets that get users to click, reply, and engage for >2 mins
- Build an engaging profile that makes people click.
Good account reputation
- Boost, calculated by follower ratio, usage, verification, if you've been banned before
- The final score, on a scale of 0 to 100, is the ’tweepcred’ score, which represents the user's reputation on Twitter.
- This score is used to determine which users should be recommended to follow or which users should have their content highlighted.
- Your "influence" on Twitter and in turn how likely your tweets are to be seen is heavily determined by the quality of users you interact with

Content quality
- Currently, if your ’tweepcred’ is lesser than 65, the maximum number of tweets that will be considered by the ranking algorithm is limited to 3.
- If your score is less than 65, your threads won’t be considered
- However, if your ’tweepcred’ is greater than 65, this limit is lifted, which means that you can post as many tweets as you want, and the algorithm will consider all of them.
Your content not being marked as ‘low-quality’ will also make sure that your ‘tweepcred’ is high enough to be considered.
Interacting with low quality accounts
- Interacting with low quality accounts get you penalised.
- Account reputation is calculated by follower to following ratio, account age, device usage, if you've been restricted or suspended, and if you're verified.
- Interact with low quality accounts with bad follower/following ratios and are marked as spam/nsfw/bots/toxic, you get penalised.
Interacting with blacklisted topics
- Your tweet or account interacting with blacklisted topics (not in the code)
Tweets relevancy over time
Tweets have a half-life of 360 minutes, which means that a Tweet's relavancy score will decrease by 50% every 6 hours.
- The overall rate at which the relavancy score of older tweets decrease is set at 0.003
- The minimal age decay score a tweet can have is 0.6
Links
- Links results in negative ranking.
- External links mark you as spam (Unless you have good engagement)
- Outbound links to non-news or media sites get clapped
- Only posting URLs or only images (No text) also reduces your rank
- External links mark you as spam (Unless you have good engagement)

Mutes & Unfollows
- Mutes, unfollows (not as bad as the other 4), blocks, spam report, abuse report results in negative ranking
- Reported tweet is reduced by 700x

New words or unknown language
Anything under point 1 in the algorithm is bad.
- Unknown languages are downranked
- Making up words or misspellings are given 0.01 which is really bad


Misinformation
- Misinformation is downranked (eve Ukraine)

Multiple hashtags
- Adding a lot of hashtags gets your post deboosted

Posting outside your cluster
- On the flip side, posting content outside your cluster gives a penalty with out of network replies.

Type of writing
- A score for the static quality of the text, computed in TweetTextScorer.java in the Ingester, based on the factors such as offensiveness, content entropy, "shout" score, length, and readability, affects your reach and engagement.
Reference Links
https://github.com/twitter/the-algorithm-ml
https://github.com/twitter/the-algorithm
Part 2: What you should do to maximize reach
- Get Twitter Blue
If you're a Twitter Blue subscriber, you get a 4x boost in the algorithm if you're in the same network as the author of the tweet, and a 2x boost if you're not. Source
- Maintain A High Follower-Following Ratio
This method reduces the page rank of users who have a low number of followers but a high number of followings. It calculates a division factor based on the ratio of followings to followers, and reduces the user's page rank by dividing it by this factor. Source
- Keep your
Tweepcred
higher than 65Tweepcred is a score given to users based on the number & quality of interactions they have with others, account age, followers and device usage which determines if more than 3 of your tweets (including threads) should get featured or not. Having healthy engagement can help you keep it high and getting spam reports, blocks and mutes can hurt really badly. Source
- Niche down and become a trusted voice in one niche.
Out of network replies get a penalty. Become popular within a specific community by engaging with prominent accounts in that niche. As more users from that community interact with your content, it becomes more associated with the niche, boosting visibility to their users. You can quickly build a strong relevance with your content if you niche down.
- Engage the most in your tweets in the first 6 hours.
Tweets have a half-life of 360 minutes, so a Tweet's relevancy score will decrease by 50% every 6 hours. Older Tweets become less relevant (and are shown less to others) over time. Engaging and replying to comments during this time can work in your favour. Source
- Add images & videos.
In the current light ranking model (Earlybird), tweets with images & videos seem to get a nice 2x boost (source). However, this is an old model that Twitter is planning to rebuild completely, so things might change in the future. source
- Be less controversial. Getting blocked/muted/reported is bad. Really bad.
Negative feedback loops reduce your "reputation score" on Twitter. Getting blocked, muted, abuse reports, spam reports and unfollows can cause a big hit on your tweepscore. Avoid having a score less than 65. Source
- Create a reason for people to engage.
After getting ranked in the 1500 tweets, the likelihood of your tweet reaching someone’s feed is heavily based on factors such as time spent on the tweet, profile visit and replies. Content that makes users take these action can skyrocket your reach.
User Action Sentiment Weight Like your tweet Positive 0.5 Retweet your tweet Positive 1 Click into your tweet & reply/like a tweet or stay there for >2 mins Positive 11 Check out your profile and like/reply to a tweet Positive 12 Reply to your tweet Positive 27 Reply to your tweet and you engage with this reply Positive 75 Request "show less often" on your Tweet/you, block or mute you Negative -74 Report your Tweet Negative -369 - Reply to every reply on your account.
If someone liking your tweet gives that tweet 1 point, you engaging with someone’s reply on your tweet gives you 150 points. Source
- Don’t add links unless you know it’s going to get engagement.
External links mark you as spam and only posting URLs can reduce your rank drastically unless your tweet gets really good engagement in the first few hours.