The X (Twitter) algorithm is the only major social ranking system whose code has been published, twice. In 2023 Twitter put its recommendation code on GitHub, including the weights the X algorithm's ranking model gave each action. A reply that the author then engages with was weighted 75, against 0.5 for a like: 150 times more. A plain reply was weighted 13.5 and a repost 1.0.
PostEverywhere schedules your X posts at the times your audience is online, so you can put this guide into practice. See how it works.
In October 2025 Elon Musk said the system would move to Grok, which would "literally read every post and watch every video (100M+ per day)" to match people with posts.
In January 2026 xAI published its new ranking code on GitHub. According to Twitter's 2023 write-up, the recommendation pipeline runs about 5 billion times a day. (Veterans still call them tweets more often than "posts".) For the latest platform data, see our X/Twitter statistics roundup.
This guide breaks down how X's algorithm works in 2026: the ranking pipeline, the published engagement weights, what changed with the new code, the Premium vs. free reach gap, and the tactics that drive impressions.
TL;DR
- X uses a multi-stage pipeline: find about 1,500 candidate posts, rank them with a neural network, then filter and mix in other items
- Conversation depth is king: in the 2023 code, a reply the author engages with was weighted 75, against 0.5 for a like. That's 150x more
- Text-only posts outperform video on X: text had about 20% more engagement than video in Buffer's 2026 data
- Links are a problem for free accounts: Buffer found link posts from non-Premium accounts have had median engagement stuck at zero since March 2025
- Premium accounts get about 10x more reach per post than free accounts in Buffer's analysis of 18.8 million posts
- The ranker is now a transformer model: xAI's published code predicts many actions for each post and combines them into one score
- Post when your audience is active (in our data, weekdays 9 AM to 3 PM), reply to replies, and use the best X/Twitter scheduler to stay consistent
Table of Contents
- How X (Twitter)'s Algorithm Actually Works
- The Engagement Weights (From Open-Sourced Code)
- The Grok-Powered Ranking Shift
- Premium vs. Free: The Reach Gap
- Content Formats: What Performs Best
- X (Twitter) Features That Affect the Algorithm
- What Actually Works in 2026
- 8 X (Twitter) Algorithm Myths Debunked
- X (Twitter) vs. Other Platforms: How the Algorithms Differ
- Recent Algorithm Updates (2023-2026 Timeline)
- FAQs
- Next Steps
How X (Twitter)'s Algorithm Actually Works
When Twitter published its recommendation algorithm in 2023, it described the For You timeline as a pipeline. The open-source repository calls it "a set of services and jobs that are responsible for serving feeds of posts".
How X builds the For You timeline
The pipeline X (Twitter) described when it open-sourced its recommendation code in 2023.
- Find candidatesAbout 1,500 posts per request, roughly half from people you follow and half from beyond.
- RankA neural network predicts how likely you are to like, repost, reply or click.
- FilterRemoves blocked and muted accounts, posts you've seen, and too many from one author.
- MixRanked posts are blended with ads, follow suggestions and other items.
The whole pipeline runs about 5 billion times a day.
Stage 1: Candidate Sourcing
The system narrows a pool of hundreds of millions of posts to about 1,500 candidates for each request. InfoQ's summary of the release notes that, on average, the timeline has "roughly an equal amount" from each of two sources:
- In-network: posts from accounts you follow, ranked with help from Real Graph, a "model to predict the likelihood of an X User interacting with another User"
- Out-of-network: posts from accounts you don't follow, found through social graph signals and SimClusters, which groups users into about 145,000 communities
Stage 2: Neural Network Ranking
In 2023 the candidates were ranked by a neural network of about 48 million parameters. It predicted how likely you were to take each action on a post: like, repost, reply, open the author's profile, click into the conversation, watch a video, or react negatively.
Each prediction was multiplied by a weight from the published code and the results were added together. xAI's newer code works the same way, with a transformer model doing the predicting.
Stage 3: Heuristics & Filtering
Filters remove posts from accounts you've blocked or muted, posts you've already seen, and content caught by safety filters, and they stop one author from dominating your feed. The final feed blends ranked posts with ads, follow suggestions and other items.
The Three Feed Tabs
- For You: the algorithmic feed, blending in-network and out-of-network posts. The default experience
- Following: chronological until November 2025, when X began using Grok to sort it by predicted engagement and relevance. Musk said you can "still access unfiltered chronological if you want"
- Explore: trending content and breaking news, organised by category
The Engagement Weights (From Open-Sourced Code)
X is unique in that its ranking weights have been published. These are the weights from the April 2023 home timeline ranking README. xAI's 2026 code combines predicted actions the same way, but its README notes the weights "do not scale the raw engagement counts", and it hasn't published a matching table, so treat the 2023 figures as the clearest public guide.
What X's ranking weighed, by action
Weights the ranking model gave each predicted action in the code X (Twitter) published in April 2023. A like counts 0.5.
| Signal | Weight | What it means |
|---|---|---|
| Reply engaged by author | +75 | You reply and the author engages with your reply. The single most powerful signal |
| Reply | +13.5 | You reply to the post |
| Profile click + engagement | +12.0 | You open the author's profile and like or reply to a post |
| Conversation click + engagement | +11.0 | You click into the conversation and reply or like |
| Conversation click + 2 minutes | +10.0 | You click into the conversation and stay at least 2 minutes |
| Repost | +1.0 | You repost it |
| Like | +0.5 | The lowest-value positive signal |
| Video watched halfway | +0.005 | For a video, you watch at least half |
How the score works: each weight multiplies the model's predicted probability that you'll take that action, and the results are added up. A post you're likely to reply to, and whose author is likely to reply back, scores far higher than one you'd only like.
The key insight: conversation depth dominates everything. One genuine reply chain where the author engages back outweighs a pile of likes, which is why "like and repost" campaigns are inefficient on X.
Negative Signals
| Signal | Weight in the 2023 code |
|---|---|
| Negative feedback (show less often, block or mute the author) | -74 |
| Report | -369 |
One report outweighs hundreds of likes. Avoid anything that makes people want to mute, block or report you.
TweepCred: The Hidden Reputation Score
The 2023 code includes Tweepcred, described in the repository as a "Page-Rank algorithm for calculating X User reputation". Many articles quote exact scores and cut-off points for it, but those numbers aren't in the published documentation, and different sources give different figures.
What's safe to say: reputation is calculated from the network of who interacts with whom, so genuine interactions with real, active accounts help, and spammy behaviour hurts.
The Grok-Powered Ranking Shift
In October 2025, Elon Musk announced that Grok would take over recommendations: "Grok will literally read every post and watch every video (100M+ per day) to match users with content they're most likely to find interesting." He added: "We are aiming for deletion of all heuristics within 4 to 6 weeks," and promised "the ability for you to adjust your feed temporarily or permanently just by asking Grok."
In January 2026 xAI published the new code at github.com/xai-org/x-algorithm. Its README describes:
- Components: Home Mixer, which builds the For You feed; Thunder, which holds recent posts from accounts you follow in memory; Phoenix, which handles retrieval and ranking; and the candidate pipeline framework Home Mixer is built on
- Ranking: Phoenix "ranks posts using a transformer model", predicting the chance of each action (likes, replies, reposts, quotes, shares, clicks, dwell, video views, follows, and negative actions such as not interested, mute, block and report). A scorer combines them as a weighted sum
- Adjustments: a decay so one author doesn't dominate, a discount for out-of-network posts, and a boost for new authors
- Content classifiers: "Grox" classifiers that label posts for categories such as spam, adult content and violent media as they're published
The release got about 1,600 GitHub stars within six hours, and Musk said the code would be updated every four weeks.
The 2026 updates: training code and filters
xAI has kept adding to the repository through 2026. Releases dated August and September 2026 added configuration and visibility filtering code, and Phoenix training code with synthetic data, so that "a small model can be trained and served end-to-end".
The ads blender that positions ads among organic posts is in the code too. Some parts are deliberately withheld, including the prompts behind the Grox classifiers.
The headline shift for creators: ranking now depends on a model that predicts what each person will do with each post, rather than on hand-tuned rules. Gaming individual weights matters less with every release.
What compounds is clear, genuinely interesting content and avoiding the negative signals the model watches for.
Premium vs. Free: The Reach Gap
Buffer's analysis of 18.8 million posts from 71,000 X accounts, from August 2024 to August 2025, documents a large reach gap between paying and free accounts.
| Metric | Free | Premium | Premium+ |
|---|---|---|---|
| Median reach per post | Under 100 impressions | Close to 600 impressions | Over 1,550 impressions |
| Median engagement rate | 0% (at least half of posts get no likes, replies or reposts) | Higher | Highest |
| Link posts | Median engagement stuck at zero since March 2025 | About 0.28% engagement rate (August 2025) | Not reported |
Premium users got "around 10x the median reach of regular accounts" in Buffer's data. Premium doesn't guarantee performance, though: it amplifies posts people already want to engage with.
On X, replies carry the most weight in the ranking code, so post when your followers can reply. PostEverywhere schedules your posts and threads on X for the exact times you choose. See the X scheduler.
Content Formats: What Performs Best
Buffer's 2026 analysis of 45 million-plus posts shows X behaves differently from most platforms when it comes to format.
| Rank | Format | Median engagement rate on X |
|---|---|---|
| 1 | Text-only | 3.56%, about 20% ahead of video and 5% ahead of images |
| 2 | Images | 3.40% |
| 3 | Video | 2.96%, 32% more than link posts |
| 4 | Links | 2.25% |
Text leads on X, while visual formats lead on Instagram, TikTok and LinkedIn. X remains text-first.
Optimal Character Count
- Short posts: posts under 100 characters, especially 71 to 100, had 17% higher engagement than longer ones in The Marketing Heaven's analysis
- Near-limit posts: the same analysis found posts of 240 to 259 characters also did well
- Threads: best for ideas that need several steps. Make the first post work on its own
Video Best Practices
- Upload natively rather than linking to video elsewhere, since links to other sites behave like link posts
- Hook people fast: in the 2023 code, watching half a video carried a tiny weight (0.005), so a video earns its reach through the replies and reposts it sparks
- Add captions for people watching with the sound off
X (Twitter) Features That Affect the Algorithm
Bookmarks
Bookmarks are private saves. The 2023 weights table didn't list them, but Social Media Today's guide to the open-source ranking factors notes that "Quotes and bookmarks are positive engagement signals that will boost your reach." Reference material, data and checklists are the posts people bookmark.
Communities
Topic-based groups, a mix of Facebook Groups and subreddits. X's help on community visibility says posts "can appear in global search, profiles and other timelines", as Tweet Archivist's guide notes, so a community post can reach beyond the members.
Spaces
Live audio discussions. Spaces from accounts you follow or topics you engage with can be promoted in the app while they're live.
Promptable Feeds (Promised)
Musk promised the ability to adjust your feed "just by asking Grok". It's a shift toward users steering their own recommendations with plain language.
Long-Form Posts
Premium subscribers can write much longer posts. There's no published long-form bonus, but in the 2023 code, someone opening the conversation and staying at least two minutes carried a weight of 10, so posts that hold attention benefit.
For ideas on what to write, see our 100 X content ideas library.
What Actually Works in 2026
Posting Strategy
Here is how posts did by day in our own early data, from more than 1,000 posts on X scheduled with PostEverywhere, each compared with the same account's usual post.
If you haven't scheduled on X before, here is how to schedule posts on X, threads included.

| Day | Against the same account's usual post (1,000+ posts on X, early data) |
|---|---|
| Monday | +1% |
| Tuesday | -1% |
| Wednesday | -5% |
| Thursday | +14% |
| Friday | -6% |
| Saturday | -4% |
| Sunday | +9% |
| Factor | Recommendation |
|---|---|
| Frequency | A cadence you can sustain. Tweet Archivist finds "no evidence" for one daily number that suits every account |
| Best days | Thursday and Sunday in our early data; Friday was the weakest |
| Best times | Weekdays 9 AM to 3 PM in our data, with lunchtime (noon to 3 PM) 13% above usual. See our best time to post on X guide, and our best time to post data for other platforms |
| Format priority | Text, then images, then video, then links |
| Character sweet spot | Under 100 characters for quick engagement; 240 to 259 also did well |
| Threads | For ideas that need several steps; make the first post stand alone |
| Hashtags | One or two relevant ones at most |
Tactics That Move the Needle
- Reply to replies. A reply the author engages with was the most heavily weighted action in the 2023 code (+75). Respond to genuine replies, especially soon after posting
- Create bookmark-worthy content. Reference material, data, frameworks and checklists
- Spark conversations, not broadcasts. Replies (+13.5) were weighted 27 times a like (+0.5). Ask questions and share opinions worth answering
- Write text-first. Text had about 20% more engagement than video in Buffer's data
- Avoid external links in the main post on a free account. Buffer found median engagement on non-Premium link posts stuck at zero since March 2025. Post the link in a reply instead. When you do share a link, check the card preview first: our Twitter Card validator catches missing og:image and broken summary_large_image tags
- Use one or two niche hashtags at most. Generic hashtags get drowned out
- Don't give people a reason to mute or report you. Negative feedback was weighted -74 and a report -369 in the 2023 code
Content Penalties to Avoid
| Penalty | Impact |
|---|---|
| External links on free accounts | Median engagement stuck at zero since March 2025 (Buffer) |
| "Show less often", mutes and blocks | Weighted -74 in the 2023 code |
| Reports | Weighted -369 in the 2023 code |
| Spam, adult or violent content | Labelled by classifiers in xAI's published code |
| Hashtag stuffing | Looks like spam and gets drowned out |
Let your AI agent do the scheduling. Ask Claude or ChatGPT to draft a week of X posts and schedule them with PostEverywhere, at your best times. Connect your AI agent.
8 X (Twitter) Algorithm Myths Debunked
1. "X Premium guarantees massive reach" Premium accounts got around 10x the median reach of free accounts in Buffer's data. But it amplifies posts people already want to engage with; dull posts from Premium accounts still underperform.
2. "The algorithm penalizes external links" For free accounts, the data says yes. Buffer found link posts from non-Premium accounts have had median engagement stuck at zero since March 2025, while Premium link posts still got about 0.28%. Post links in a reply instead.
3. "More followers = more visibility" Not on its own. Around half the For You timeline comes from accounts people don't follow, and posts are ranked on how likely each person is to engage.
A smaller account whose posts start conversations can out-reach a large account with passive followers.
4. "Hashtags guarantee reach" They don't. Generic hashtags get drowned out, and stuffing them in looks like spam. One or two relevant hashtags help people searching a topic find you; more doesn't help.
5. "All engagement is equal" The published 2023 weights prove otherwise. A reply the author engages with was worth 150x a like, a reply 27x, and a repost only 2x. Likes are the lowest-value positive signal.
6. "Video always outperforms text on X" In Buffer's 2026 data, text-only posts had about 20% more engagement than video on X. X is a text-first platform.
7. "Only your followers see your posts" On average, roughly half of For You candidates come from out-of-network sources. The algorithm shows posts to non-followers based on communities and interest matching.
8. "You can game the algorithm with engagement pods" Pods produce likes and replies from the same small group, while the ranker predicts what each individual viewer will do. They don't make a post relevant to anyone else, and if your posts annoy people, the negative feedback weights (-74 and -369 in 2023) dwarf the positive ones.
X (Twitter) vs. Other Platforms: How the Algorithms Differ
| Factor | X | TikTok | ||
|---|---|---|---|---|
| Open-source algorithm | Yes (twice) | No | No | No |
| Top ranking signal | Replies the author engages with (+75 in 2023) | Watch time, sends | Watch time, completion | Dwell time, comments |
| Dominant format | Text-first | Video (Reels) | Short video | Documents and text |
| Content lifespan | Hours | Days | Days to weeks | Days |
| Real-time focus | Very high | Low | Low to medium | Low |
| Pay-to-play | Strong (about 10x median reach for Premium) | Ads | Ads | Ads |
| Link penalty | Severe for free accounts | Links not clickable in captions | Links limited | Not published |
| Code transparency | Ranking code published | Not published | Not published | Research papers only |
X's unique advantages: the only major platform with published ranking code, the fastest content cycle, and a feed where text beats video. The trade-off is a large gap between free and paid accounts, especially for links.
For how other platform algorithms compare, see our guides on Instagram, Facebook, and LinkedIn. For the opposite approach, where users choose their own feeds, see how the Bluesky algorithm works.
Spend your time on posts worth sharing, not on posting them. PostEverywhere publishes to X and every other top platform from one calendar. Start your 7-day free trial. Plans start at $9 a month.
Recent Algorithm Updates (2023-2026 Timeline)
August to September 2026. xAI adds configuration, visibility filtering and Phoenix training code to the x-algorithm repository.
January 2026. xAI publishes the new ranking code, built around a transformer ranker. It gets about 1,600 GitHub stars in six hours, and Musk says it will be updated every four weeks.
November 2025. The Following feed becomes Grok-sorted by default, with chronological order still available.
October 2025. Musk announces the move to Grok: "We are aiming for deletion of all heuristics within 4 to 6 weeks." Grok will read every post and watch every video.
2025. X's average engagement rate falls to 0.12%, from 0.15% in 2024, the steepest drop of the platforms Socialinsider tracks. Check your own rate with our free engagement rate calculator.
August 2024 to August 2025. Buffer's 18.8-million-post study finds Premium accounts get about 10x the median reach of free accounts, and link posts from free accounts hit zero median engagement from March 2025.
March 2023. Twitter open-sources its recommendation algorithm. The code reveals the engagement weights, Tweepcred, and the roughly even in-network and out-of-network split.
Key Platform Stats
| Metric | Value |
|---|---|
| Monthly active users (X and the Grok app combined) | About 550 million (March 2026) |
| Recommendation pipeline runs | About 5 billion a day (2023) |
| Average engagement rate | 0.12% (2025) |
| Change from 2024 | Down from 0.15%; see our social media statistics for cross-platform comparisons |
| Free account median reach | Under 100 impressions |
| Premium account median reach | Close to 600 impressions |
| Daily time in the Android app | 32 minutes (global average) |
For the latest platform changes, see our trends guide.
For exact dimensions and format specs, see our X image sizes guide.
X Algorithm Updates in 2026
Where X's algorithm stood in early 2026:
- New ranking code is public. xAI published its transformer-based ranker in January 2026 and has kept adding to it.
- The Following feed is ranked by default. Since November 2025, Grok sorts it by predicted engagement and relevance, with chronological order still available.
- Links remain a problem for free accounts. Buffer's data shows median engagement on non-Premium link posts stuck at zero since March 2025.
How PostEverywhere helps with the X algorithm
Every algorithm in this guide rewards the same habits: posting consistently, posting when your audience is online, and making each post fit the platform. PostEverywhere is built for that:
- Schedule posts, threads, polls and posts to X Communities, and add a first comment to keep links out of the main post
- Post in the strongest windows for X with best-time suggestions as you schedule
- Write and adapt captions with AI Studio, and keep a steady rhythm with the posting queue
- Let your AI agent do it: ask Claude or ChatGPT to draft and schedule a week of posts through PostEverywhere (connect your AI agent)
See the PostEverywhere X scheduler, or start a 7-day free trial; plans start at $9 a month.
FAQs
Does the X algorithm penalize scheduling tools?
No. X provides an official API that scheduling tools like PostEverywhere use to publish posts. The algorithm ranks a post on how people are likely to respond to it, not on how it was published.
How often should I post on X in 2026?
As often as you can keep up with quality. Tweet Archivist finds no single daily number that suits every account, so pick a sustainable cadence, count replies and threads as part of it, and change one thing at a time.
Is X Premium worth it for reach?
For reach, the data is clear: Premium accounts got around 10x the median reach of free accounts in Buffer's analysis of 18.8 million posts, and free accounts had a median engagement rate of 0%. If X matters to your marketing, Premium makes a big difference.
Why do my link posts get no engagement?
If you're on a free account, that's typical: Buffer found median engagement on non-Premium link posts stuck at zero since March 2025. Post the link in a reply to your main post instead.
What's the most valuable engagement signal on X?
A reply that the author engages with, weighted +75 in the 2023 ranking code. That's 150x a like. Replying to genuine replies is the highest-leverage thing you can do on X.
Do hashtags help on X in 2026?
In small doses. One or two niche, relevant hashtags help people searching a topic find you. Generic or stuffed hashtags get drowned out and look like spam.
What is TweepCred and does it affect my reach?
Tweepcred is a reputation score in X's published code, a "Page-Rank algorithm for calculating X User reputation". Exact scores and cut-offs quoted online aren't in the published documentation. Genuine interactions with real accounts help; spammy behaviour hurts.
How does Grok's sentiment analysis affect my posts?
X hasn't published a sentiment rule. Its published code does label posts with classifiers for categories such as spam, adult content and violent media, and it weighs negative feedback heavily: mutes, blocks and "show less often" were weighted -74 in 2023, and reports -369.
Posts that make people want to mute you lose reach.
Next Steps
X's algorithm in 2026 is unusually transparent: the ranking code is public, the 2023 weights are documented, and the Premium reach gap has been measured. The strategy is clear: spark conversations (a reply the author engages with was weighted 150x a like), write text-first posts, keep links out of the main post on a free account, and be around to reply.
The biggest variable is the Premium vs. free gap. For businesses serious about organic reach on X, the paid tier makes a large difference. For 15 growth strategies built on these signals, read our guide to getting more followers on X.
Put this into action on X (Twitter)
- Schedule your X posts: plan posts, threads and media in advance with PostEverywhere's X integration
- Find your best posting times: our data on the best time to post on X
- Generate engaging content: draft text-first posts, hooks and thread ideas
- Manage multiple X accounts: handle client and personal accounts from one dashboard
How other platform algorithms compare
AI workflow for X (Twitter) threads and posts
- How to use Claude for social media: writing X threads with an AI agent
- The complete guide to using AI for social media: a workflow for captions, threads and hooks
Sources
Every outside fact in this article comes from the pages below. Our own figures come from posts scheduled with PostEverywhere, as explained where they appear.
- Social Media Today: X’s Algorithm Is Shifting to a Grok-Powered AI Model
- Hootsuite: Twitter reveals how its recommendation algorithm works
- Buffer: Do Posts with Links Affect Content Performance on X?
- X Engineering: Twitter recommendation algorithm
- GitHub: twitter/the-algorithm: Source code for the X Recommendation Algorithm
- InfoQ: Twitter Open-Sources Recommendation Algorithm
- GitHub: the-algorithm-ml/projects/home/recap/README.md
- Social Media Today: X Now Algorithmically Ranks Posts in Following Feed
- GitHub: x-algorithm/README.md
- 36Kr: Elon Musk Shocks with X's Open-Sourced Recommendation Algorithm: 1,600 GitHub Stars in Six Hours, Boasts No Competitor Match
- Buffer: Does X Premium Really Boost Your Reach? An Analysis of 18M+ Posts
- Buffer: Best Content Format on Social Platforms in 2026: 45M+ Posts Analyzed
- The Marketing Heaven: What Is the Ideal Character Count for a Tweet?
- Social Media Today: X Shares Insights Into Key Factors That Dictate Post Reach
- Tweet Archivist: Twitter Communities Guide: Join, Post, Create & Moderate on X
- Tweet Archivist: How Often to Post on Twitter: Choose a Sustainable Cadence
- Socialinsider: Social Media Benchmarks For 2026
- SocialPilot: Top X (Twitter) Statistics for 2026: Users, Ads & Demographics

Founder & CEO of PostEverywhere. Writing about social media strategy, publishing workflows, and analytics that help brands grow faster.



