How the X Algorithm Works in 2026: How Posts Get Ranked
Why do some posts travel and others stall? See how the X algorithm ranks posts in 2026, straight from X's open-source code, and how to write for it.

The X algorithm ranks posts in the For You feed by predicting how each reader will react to each post. A Grok-based model estimates the chance you will like, reply, repost, share, follow the author or dwell on a post, and the chance you will mute, block or report it. X multiplies each prediction by a weight, adds them up, adjusts for variety, and shows the posts with the highest score.
That is the Twitter algorithm in one paragraph, and it comes from the code X itself publishes. Below you will find each stage of the ranking, the real weights, the myths the code settles, and what to change in your posts.
1. Know where the code comes from
X published its rebuilt For You ranking code in January 2026, as TechCrunch reported, and keeps it in the xai-org/x-algorithm repository on GitHub. This replaced Twitter's 2023 release, which was never updated, so treat older guides built on the 2023 code with care.
The repository is active. At the time of writing (November 2026), its notable updates list changes on 13 August, 18 September, 8 October, 13 October and 26 October 2026, including better time-spent prediction and retrieval trained on posts people read through. Our summary below reflects the code as it stood when we read it.
2. Understand the five stages of ranking
Every time you open For You, X runs the same pipeline, described in the repository's README:
- Gather candidates. "Thunder" collects recent posts from accounts you follow. "Phoenix" retrieval, SimClusters and a popular-posts source add posts from accounts you do not follow.
- Filter. X removes duplicates, posts older than 48 hours, your own posts, posts from accounts you blocked or muted, posts with your muted keywords, posts you have already seen, and subscriber-only posts you cannot open.
- Predict. The Phoenix model, a transformer built on Grok, reads your recent engagement history and predicts a probability for each action you might take on each post.
- Score. A weighted sum turns those predictions into one number. The ranker then applies repeated-author decay, a discount for out-of-network posts and a boost for new authors.
- Select. The top posts by score go through visibility filtering, which decides whether a post can be shown at all, and a final step removes duplicate conversations.
3. Learn which reactions the algorithm rewards
The weights live in the repository's parameter file. At the time of writing (November 2026), they include:
| Predicted action | Weight |
|---|---|
| Share via copy link | 20.0 |
| Reply | 5.0 |
| Share via DM | 5.0 |
| Quote | 5.0 |
| Follow the author | 4.0 |
| Share | 2.0 |
| Repost | 1.0 |
| Like | 0.66 |
| Block the author | −31.2 |
| Not interested | −52.272 |
| Mute the author | −58.8 |
| Report | −234.0 |
| Reply bonus when you follow each other | +15.0 |
The file's own comments explain how to read this: the weights multiply the predicted probability of an action, so they never mean "one report equals 354 likes". A report is more than 1,000 times rarer than a like, which is why its weight is so large. Read the table as direction: posts that start conversations and get passed on rise, and posts that make people mute you sink.
Three lessons follow:
- Write for replies. Ask a real question, take a clear position, or share a number people want to discuss. A reply carries about 7.6 times the weight of a like (5.0 ÷ 0.66).
- Write things people send to friends. DM shares and copied links carry some of the highest weights in the file. Useful lists, templates and data travel this way.
- Protect your audience's patience. Off-topic bait, ragebait and repetitive self-promotion earn "not interested" and mutes, and those cost more than likes earn.
4. Use time and variety to your advantage
Two filters shape when and how often to post:
- The 48-hour window. Posts older than 48 hours leave the candidate pool, so most of a post's For You life happens in its first two days. Post when your audience is awake. Our guide to the best time to post on X shows how to find those hours.
- Repeated-author decay. The ranker scores each extra post from the same author in one feed lower than the last. Five posts in an hour compete with each other. Spread them across the day.
The code also lists a boost for new authors and settings named "cold start" for small accounts. That is good news if you are starting out: the system has a mechanism for showing newer voices to fresh readers.
5. Write posts that dwell well
The model predicts dwell time and how long people spend on a post after clicking it, and both carry positive weights. A post people read to the end beats one they scroll past, which rewards a strong first line and a clear payoff. "Not dwelled", a quick scroll past, carries a small negative weight.
Practical moves:
- Lead with the most interesting line. Our hook library has patterns that earn a second look.
- Keep a single idea per post and cut the warm-up.
- Check length and preview before you publish with the free post checker, which counts characters the way X does. The character limit guide covers the limits for each account type.
GrowX's analytics show which formats and pillars earn replies and reposts on your account, so you can do more of what the ranker rewards for your audience.

6. Settle the common myths
- "Premium accounts get a feed boost." We found no Premium or verified boost in the public feed-ranking code. X's Premium help page lists reply prioritisation, which ranks Premium replies higher in conversations. Our guide on whether X Premium is worth it covers what you get for the money.
- "Links kill reach." The code predicts link opens with a small positive weight and contains no link penalty we could find. In July 2026, X's head of product told users to stop putting links in replies. Posts with links still tend to earn fewer reactions, because readers leave X to open them, so give the post value on its own.
- "Hashtags boost reach." The weights in the parameter file include no hashtag factor. Use a hashtag only when people actually search or follow it.
- "Scheduled posts are penalised." The ranking inputs describe readers and their predicted reactions, and the publishing app is absent. Our research on whether automation hurts engagement covers the evidence.
- "I am shadowbanned." Visibility filtering is real and separate from ranking. X's authenticity policy explains when reach is limited. See our shadowban definition for how to check.
7. Grow your In-Network reach with replies
Thunder collects posts from accounts people follow, so every new follower adds you to someone's candidate pool. Replies are the fastest route to new followers: a thoughtful reply under a bigger account puts you in front of its readers, and the reply weight plus the mutual-follow bonus reward conversations you keep going.
GrowX's Replies screen shows posts you scrolled past on X and drafts three replies in your voice, Reply, Insight and Counter. You choose one, edit it if you like and press Post yourself.

Keep replies human and specific. X's automation rules restrict automated replies, and the negative weights punish replies that read like spam.
8. Set realistic expectations
Understanding the algorithm helps you stop doing what it punishes. It cannot make a post interesting. Expect the clearest gains from two changes: fewer posts that annoy readers, and more posts that start conversations. Measure your engagement rate on your own account for four weeks with the engagement calculator, compare formats posted at similar times, and keep what works. Results vary by niche and audience size, and the weights can change with any repository update, so check the parameter file every few months.
Frequently asked questions
How does the Twitter algorithm work in 2026?
X's For You feed gathers posts from accounts you follow and accounts you do not, filters out old, seen and muted posts, predicts how you will react to each one with a Grok-based model, and ranks them by a weighted sum of those predictions. The code is public in the xai-org/x-algorithm repository.
What does the X algorithm reward most?
Replies, quotes, DM shares, copied links and follows carry the highest positive weights, and a reply between accounts that follow each other gets an extra bonus. Likes carry a small weight in comparison.
What hurts reach on X?
Predicted "not interested" clicks, mutes, blocks and reports carry the heaviest negative weights in the code. Posts older than 48 hours also leave the For You candidate pool, and repeated posts from the same author in one feed score lower each time.
Does X Premium boost your posts in the algorithm?
The public feed-ranking code shows no Premium boost. X's Premium help page lists reply prioritisation, which ranks Premium subscribers' replies higher in conversations.
Does the X algorithm penalise links?
We found no link penalty in the open-source code, and X's head of product told users in July 2026 that links no longer need to go in replies. Linked posts can still earn fewer reactions because readers leave X to open them.
How often does the X algorithm change?
The repository listed five notable updates between August and October 2026 alone. Check the README's update list and the parameter file every few months.
Related articles
- How to Grow on X in 2026
- How to Get Your First 1,000 Followers on X
- How to Grow on X with Replies
- The Best Time to Post on X
Write for the algorithm without thinking about it
The ranker rewards posts that start conversations and replies that add something. GrowX learns your voice from your past posts, drafts posts and replies for you to approve, and shows which formats earn replies on your account, so each post you publish is built for the reactions that count.