Hacker News has a secret: its front page is not run by human editors. It is run by a formula that punishes articles for being popular, and today that formula is in the spotlight. A 2013 post explains righto.com’s ranking system in detail, and it shows how the site’s #1 spot is a constant fight between votes and penalties.
The system is simple on paper. Each article gets a score based on its votes, the time since it was posted, and a penalty system that knocks points off articles with too many comments, too many votes, or a title that triggers an automatic flag. The formula is designed to make sure nothing sits at the top for too long. But the system has a problem: it punishes articles for being popular, not for being bad.
Ranking by Votes, Time and Penalties
The core of the ranking system is a scoring formula that gives each article a number. That number is based on votes, time, and penalties. The formula is described in the 2013 post, and it works like this:
- Votes count as a positive factor
- The time since posting counts as a negative factor
- Penalties can knock the score down sharply
The time factor is known as “gravity.” It means that as an article gets older, its score drops until it reaches zero, because the time decay outweighs the votes. Nothing stays on the front page forever. This is the point of the system: to keep the page fresh and moving.
But the system does not sort the page every time someone visits. That would take too much work. Instead, articles are only moved when they get a new vote. When a story gets an upvote, it gets re-ranked and moved up or down the list. The other stories stay put. This saves a lot of work, but it also means a story can get stuck in a high position if it stops getting votes.
To fix that, Hacker News picks one of the top 50 stories at random every 30 seconds and re-ranks it. This keeps the page from getting stuck, but it also means a story can be ranked wrong for many minutes if it isn’t getting votes.
The Chart
The 2013 post includes a chart that shows what this looks like in practice. It tracks the raw scores of the top 60 articles on November 11, colored by where they sat on the page. The red line shows the top article of the day.
The chart shows several things at once. An article’s score shoots up fast and then drops slowly over many hours. The scoring formula accounts for some of this: an article getting a constant rate of votes will peak and then fall. But the peak is even faster than the formula alone would explain. Articles tend to get a lot of votes in the first hour or two, and then the voting drops off. That combination gives the steep curves you see on the chart.
There are a few articles each day that score much higher than the rest. There are a lot of articles in the middle. Some articles score well but get stuck behind a more popular one. Other articles hit #1 briefly, between the fall of one and the climb of another.
The chart also shows where penalties hit. The green triangles and text mark “controversy” penalties. The blue triangles and text mark articles that were penalized so heavily they dropped off the top 60 entirely. Milder penalties are not shown here.
What the Top Spot Really Means
The content of the #1 spot on Hacker News is not “natural.” It results from the constant application of penalties to many articles. The formula punishes articles for being popular, and the chart shows this in action.
The #1 spot is not the most popular article. It is the article with the least penalty.
Automatic Penalties
Some submissions get automatically penalized based on the title or the domain. Articles with “NSA” in the title get a penalty of .4. The post looked for other words causing automatic penalties, such as “awesome,” “bitcoin,” and “bubble,” but found they do not seem to get penalized.
Many websites also get automatic penalties. The 2013 post observed that many websites appear to automatically get a penalty of .25 to .8. The list includes arstechnica.com, businessinsider.com, easypost.com, github.com, imgur.com, medium.com, quora.com, qz.com, reddit.com, rt.com, stackexchange.com, theguardian.com, theregister.com, theverge.com, torrentfreak.com, and youtube.com. The post says it is sure the actual list is longer.
This is separate from “banned” sites, which were listed at one point. One interesting theory is that news from popular sources gets submitted in parallel by multiple people, resulting in more upvotes than the article merits. Automatically penalizing popular websites would help counteract this effect.
The Impact of Penalties
The scoring formula lets you work out what a penalty really means. A penalty factor of .4 means each vote only counts as .3 votes. It also means the article drops in ranking 66% faster than normal. A penalty factor of .1 is much worse: each vote counts as .05 votes, or the article drops at 3.6 times the normal rate.
The Controversy Penalty
The controversy penalty is designed to stop flamewars. Articles with “too many” comments get heavily penalized. In the published code, the contro-factor function kicks in for any post with more than 20 comments and more comments than upvotes.
The actual formula is different. It is active for any post with more comments than upvotes and at least 40 comments.
The exponent in the formula is a matter of guesswork. Based on empirical data, the 2013 post suspects the exponent is 3, rather than 2, but has not proven it.
The penalty can be sudden and catastrophic. The chart shows several examples of this in action.
The Articles of November 11
The 2013 post uses the articles of November 11 to show how the system works. A few stand out:
- “Getting website registration completely wrong” hit #1 early in the morning but was penalized for controversy and dropped rapidly, letting “Linux ate my RAM” briefly get the #1 spot before “Simpsons in CSS” overtook it.
- “Apple Maps” hit #1 and was penalized shortly after, losing its spot and dropping down the rankings.
- The “Snapchat” article reached the top but was penalized so heavily at 8:22 am that it dropped off the chart entirely.
- “Why you should never use MongoDB” was hugely popular and would have spent much of the day at #1, except it was penalized and languished around #7.
- “Severing ties with the NSA” started with a NSA penalty but was so popular it still got #1. It was then given an even bigger penalty and dropped the page.
- Near the end of the day, “$4.1m goes missing” was penalized. As it turned out, it would have soon lost the #1 spot to “FTL” even without the penalty.
Each of these articles shows the same pattern. The article gets popular, it triggers a penalty, and it drops. The #1 spot is not the most popular article. It is the article with the least penalty.
The Cost of the System
The ranking system punishes popularity. It is designed to make sure nothing sits at the top for too long, and it does this by giving articles a score that drops over time and by applying penalties. The system also keeps the page from getting stuck by picking one of the top 50 stories at random every 30 seconds and re-ranking it.
The system is opaque. It is not clear if those penalties come from administrators or flagged articles.
The system is also inconsistent. Some words trigger automatic penalties, but not others. Some domains get penalties, but not all. The 2013 post notes that the actual list of penalized domains is longer than the one shown. The system is not designed to be fair. It is designed to keep the page moving.
The funny part is that the system punishes itself. The gravity factor means every article’s score eventually drops to zero, no matter how many votes it gets. The page is not about finding the best articles. It is about finding the articles that are popular right now, without letting them stay there too long. The system is a constant fight between votes and penalties, and the 2013 post shows that fight in detail.
The 2013 post also shows that the system is not perfect. The content of the #1 spot is not natural. It is the result of penalties applied to many articles. The system is opaque, and it is not clear if those penalties come from administrators or flagged articles.
Source material: “How Hacker News ranking works: scoring, controversy, and penalties (2013),” righto.com.
Get the Notebook.
The day's best stories and every fresh verdict, in plain English, in your inbox by seven. One email a day, no more.

