Technology

How the algorithm works: Instagram, TikTok and YouTube explained simply

Why your Instagram, TikTok and YouTube feeds know you so well, what the algorithms actually measure, and how to push back.

Open Instagram in the morning and you will notice something a little uncanny. The first reel is a video about a recipe you only thought about cooking last week. The second is a clip from a podcast you listened to once, on a friend’s car stereo, six months ago. The third is a holiday destination you searched for late one night and never told anyone about. None of this is magic, and none of it is quite as personal as it feels. It is just the algorithm doing what it has been built to do, which is to keep you watching for one more swipe.

The word algorithm gets thrown around as though it means something mysterious, but the underlying idea is simple. Every major platform has a sorting system that decides, in the half second between you opening the app and the first piece of content appearing, which post out of the millions available is most likely to make you stay. The system has no opinions. It does not understand what you are watching. It just measures your behaviour, predicts what you will respond to next, and serves it up. The differences between Instagram, TikTok and YouTube are real, but at the most basic level they are all running variations of the same recipe.

TikTok is the cleanest example because it was built around the algorithm from the start. The For You page does not care who you follow. It cares about how long you watch each clip, whether you finish it, whether you watch it twice, whether you tap the screen, like, comment, share or save. Every one of those signals goes back into a model that is constantly updating its picture of you. If you watch a 30 second video about Japanese knife sharpening to the end, then immediately scroll past three videos about cars, the system makes a small bet. It shows you another knife video, sees what you do, and adjusts. Within a few hundred swipes it has a working profile of your preferences that is often more accurate than the one you have of yourself. This is why TikTok feels so addictive on day one. There is no warm up period. The algorithm is doing live, intensive testing on you from the first scroll.

Instagram works on similar principles but the inputs are messier. Reels behave a lot like TikTok, with watch time and replays driving distribution. The main feed and Stories are weighted differently because they sit on top of an older social graph. Meta still uses who you follow, who you message, whose posts you tend to like, and how recently any of that happened, as a heavy thumb on the scale. If you direct message a friend often, you will see their posts near the top. If you have not interacted with a brand account in months, you may stop seeing them altogether, even though you are technically still following them. The Explore tab is the closest cousin of TikTok’s For You page, and it relies on similar engagement signals from accounts and posts that look statistically similar to ones you have engaged with before.

YouTube is the oldest of the three and works on a slightly longer time horizon. The home page and the suggested videos column on the right of any video are powered by what Google calls a two stage system. The first stage casts a wide net and pulls in a few hundred candidate videos from the millions uploaded each day. The second stage ranks those candidates based on what it thinks you will click, watch and finish. The signals it weighs most heavily are click through rate, average view duration, and whether you tend to come back the next day. This is why YouTube creators talk about thumbnails and titles obsessively. A video can be brilliant, but if nobody clicks the thumbnail, the algorithm assumes it is uninteresting and stops recommending it. YouTube also tracks longer trends than the other two. Watch a 40 minute documentary on the Roman Empire and YouTube will quietly shape your home page around history content for weeks.

What all three systems share is a goal that has nothing to do with helping you. The goal is to maximise time spent in the app. That is the metric that drives advertising revenue, and advertising revenue is the business. Anything that keeps you scrolling is good for the algorithm, and anything that does not is treated as friction. This is not a conspiracy. It is just what the system has been told to optimise for, and it does so very efficiently. The result is that content which provokes a reaction, whether that is delight, outrage, envy or curiosity, tends to be promoted over content that is calm and informative. The platforms know this. They tweak the rules constantly to soften the worst effects, but the underlying incentive does not change.

The other thing worth understanding is how quickly your feed can shift. If you spend a weekend watching property videos because you are thinking about moving house, your home page on every platform will be smothered in property content for a week. If you accidentally watch one conspiracy clip to the end, you may see three more that evening. The algorithm has no sense of context. It cannot tell whether you watched something because you loved it or because you were horrified by it. All it sees is that you stayed.

The good news is that you can push back. Every platform offers a Not Interested button on individual posts, and using it actually works. Unfollowing or muting accounts that drag your feed in directions you do not want is more effective than most people realise. On YouTube you can clear your watch history, or pause it for a week, and watch the home page reset to something close to neutral. On TikTok you can long press a video and tell the app you want fewer like it. None of this gives you total control, but it does mean the feed is more like a garden than a weather system. If you never tend it, it will grow whatever the algorithm thinks will keep you watching. If you give it a little attention, it will start to look more like something you actually chose.

Algorithms are not evil and they are not particularly clever. They are pattern matchers running at vast scale, optimising for a single number, and they will keep doing that whether you understand them or not. The advantage of knowing roughly how they work is that you stop being surprised by what your feed shows you, and you stop blaming yourself for the time you lose to it. The phone is not reading your mind. It is just very good at noticing what you do not put down.

Featured image: Photo by cottonbro studio on Pexels.