Does anyone know how SO user reputation leagues work for people who have the same recent score? I was wondering because I checked the league and I saw enter image description here

We all have the same month reputation. However, I'm ranked #878 while MadProgrammer is ranked #876! Obviously this is a GIANT bug that must be corrected at once.

But actually, how is this decided? It's bugging me that I can't find any pattern.

  • By total rep it goes: 3rd-1st-2nd
  • By rank change: 1st-3rd-2nd (maybe)
  • By membership time: 2nd-1st-3rd
  • Alphabetically: 3rd-1st-2nd
  • By badges: 3rd-1st-2nd
  • By coolness of pic: 3rd-2nd-1st

So the only thing I can think of is that someone wrote an extremely sophisticated algorithm to rank the coolness of pictures and then ranks them in reverse order. If this is true, can I please have it?

-EDIT- Went back today and it looks like Aaron is probably right

enter image description here

  • 3
    +1 for making me laugh. "ranks them in reverse order" indeed =) Jul 16, 2012 at 14:57
  • I heard it ranks them on head to heads. Where users have both answered the same question, winner takes all (he with the most upvotes). Jul 16, 2012 at 15:02
  • @ThePower that doesn't seem to be very practical. I wonder how extremely rare it is that two people with the exact same rep for the exact same period even participated on questions in the same tag, never mind on the same very questions. Maybe when skeet is battling it out with someone at the end of the month...
    – Aaron Bertrand Staff
    Jul 16, 2012 at 15:10
  • @thePower I checked, neither of these people have answered the same question as me (they're both [java] I'm [objective-c] [ios])
    – Dustin
    Jul 16, 2012 at 15:11
  • You edited it to say Aaron was right, so why don't you accept his answer (that had only a net of 2 upvotes until I upvoted it)? Otherwise his shows up so far underneath the one you "accepted" Nov 2, 2018 at 7:12

3 Answers 3


The tie-breaking behavior is currently undefined. I don't think we ever gave it much thought, so this is subject to change in the future.

  • Is this the source of a similar issue on the tag/topusers pages Jul 18, 2012 at 15:07
  • Could slap a [Id] % 29 into the order by, then it would be defined but seemingly pseudo-random. Plus it would keep folks guessing as to why they were ranked lower.
    – user7116
    Jul 18, 2012 at 17:40
  • It's been 6 years, no one was able to write an IF statement? Nov 2, 2018 at 7:11
  • I came across this page again while trying to figure out why this was happening. I wanted to upvote the most recent comment, then realized I couldn't do it because it was my own comment! Now my comment would be "it's been 9 years, SE was not able to decide on a convention"? Aug 23, 2021 at 18:33

My guess is that all of those with the same score are ranked in random order (just like answers with the same up-vote score). I bet if you refresh the page enough times you'll see a different order. If it were alphabetical, you'd be #877 every time. Is that a win? Does it really matter?

  • 3
    Personally I'd much prefer no tie breaker random or otherwise and all tie results are given the same rank. Like the way RANK() works. Jul 16, 2012 at 15:03
  • Well this does seem reasonable, so I went and revisited the page ten times - same order every time. In addition, the 7 people who gained 513 reputation were ranked in the exact same order each time. You're right, it doesn't matter I was just annoyed by my inability to find a pattern. It's likely that the ranking IS random, just on a per-day basis instead of a per-view basis.
    – Dustin
    Jul 16, 2012 at 15:05
  • @Cake yes it may very well be decided once, at the end of the day when the rep calcs are refreshed, as opposed to every time you visit the page. Let us know what rank you have tomorrow.
    – Aaron Bertrand Staff
    Jul 16, 2012 at 15:06
  • 4
    Probably not random, but probably undefined. It may be the order of rows in some database view, for example, which is indexed on one field but not on others. Jul 16, 2012 at 15:07
  • @ErnestFriedman-Hill yes, possibly either - the only reason I suspect random is that they do this for answers and it seems fair. Undefined is an important distinction, but please don't imply that rows in a table or view are ordered. They're not - they're a collection of unsorted rows, by definition, and don't have an "order" unless you specify an order in your query.
    – Aaron Bertrand Staff
    Jul 16, 2012 at 15:11
  • It's cached server side, whenever the cache is rebuilt, new random order is being set. Oct 29, 2014 at 15:25

I'm assuming the rankings are computed by a SQL Server query. It looks to me like the league is using ROW_NUMBER() to assign a "ranking". If the specified ORDER BY results in ties, then the assigned row number within a given score set is arbitrary (undefined).

Changing the query to use RANK() instead of ROW_NUMBER() would give the more logical result of all users with the same score being assigned the same rank. If three people all have the top score, then all three would be given a rank of 1, and the next assigned rank would be 4.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .