How the X (Twitter) Algorithm Works in 2026

Last reviewed . Every claim links to its official source. By Muhammed Abdul Kalam

X's For You Timeline mixes roughly 50% in-network posts from accounts you follow with 50% out-of-network content discovered via graph and embedding models. Posts are scored by a heavy neural network ranker, filtered through a visibility layer that enforces legal compliance and quality standards, and ranked using explicit signals like likes and replies alongside implicit signals like profile visits and tweet clicks.

In March 2023, X (formerly Twitter) published the source code for its recommendation algorithm on GitHub. The claims below come directly from that repository's README and component documentation — the first time X made the mechanics of its timeline public.

Key signals

Official

Approximately 50% of X's For You Timeline posts come from the in-network search index — posts from accounts the user follows.

X (formerly Twitter), 2023
Official

X uses a heavy neural network ranker as one of the main signals for selecting which posts appear in the For You Timeline after candidate sourcing.

X (formerly Twitter), 2023
Official

X collects both explicit user signals — likes and replies — and implicit signals — profile visits and tweet clicks — to rank content in the timeline.

X (formerly Twitter), 2023
Official

X uses Real-Graph — a model that predicts the likelihood of a specific user interacting with another specific user — as a relationship-strength ranking signal.

X (formerly Twitter), 2023
Official

X's visibility filter applies hard-filtering, visible product treatments, and coarse-grained downranking to support legal compliance, improve product quality, increase user trust, and protect revenue.

X (formerly Twitter), 2023

Key takeaways

  • About 50% of For You posts are from accounts you follow; the other 50% comes from out-of-network graph and embedding discovery.
  • A heavy neural network ranker scores all candidates — explicit signals (likes, replies) and implicit signals (profile visits, clicks) are both used.
  • TweepCred applies a PageRank-style reputation score to X users, influencing how posts from those users are weighted.
  • Real-Graph predicts the likelihood that two specific users will interact — a direct relationship-strength signal.
  • A dedicated visibility filter applies hard removal, product treatments, and coarse downranking to enforce compliance and quality.
On this page
  1. Where For You posts come from
  2. How posts are ranked
  3. What gets filtered or downranked
  4. Where these signals come from
  5. FAQs

Where For You posts come from

How posts are ranked

What gets filtered or downranked

Where these signals come from

X (formerly Twitter)

X (Twitter) algorithm: FAQs

What percentage of X's For You Timeline comes from accounts you follow?

Approximately 50%. X's open-source README states the search-index candidate source (In-Network posts) accounts for ~50% of posts. The other ~50% comes from out-of-network sources such as graph traversals and embedding models.

How does X rank posts once it has gathered candidates?

X uses a two-stage ranking system: a light ranker quickly narrows the candidate pool, then a heavy neural network ranker scores the remaining candidates. The heavy ranker is described as "one of the main signals used to select timeline posts."

What user signals does X collect to rank content?

Both explicit signals — likes, replies, retweets — and implicit signals — profile visits, tweet clicks — are collected through a User Signal Service and fed into ranking models.

How does X calculate a user's reputation for ranking?

X uses TweepCred, a PageRank-derived algorithm, to calculate each user's reputation score. This reputation influences how much weight their posts and interactions carry in the recommendation system.

What is X's visibility filter responsible for?

The visibility filter handles hard-filtering, visible product treatments, and coarse-grained downranking to support legal compliance, improve product quality, increase user trust, and protect revenue.