This question is by far the highest up-voted question and this question is the most down-voted question based on this answer in SO.
What is the highest number of up-votes and down-votes that a question can earn?
Stack Overflow is using SqlServer as its underlying database. We don't know the exact database schema but it is believed that what we find in The Stack Exchange Data Explorer is close to the real thing.
The score
is stored in the posts
tables and from the information_schema we learn that the datatype is int
. Looking up the actual maximum values for that type in the online documentation for Sql Server gives us:
2,147,483,647
that is the number Rizier123 mentioned as well.
Now that we know the technical maximum limit we have to figure out how that score field get its value.
The score goes up by one if a user with at least 15 reputation up votes the post. Every user can only vote once on a post. If you would start today and every single user with at least 15 rep would all up-vote the same post the maximum score a post could get would be:
1,175,540
This number could in theory be a bit higher if you would take into account all users that ever existed on the site, had more than 15 rep and all decided before they left/the account was abandoned to up-vote that single post. But for that we would have to rewrite history which I leave to others.
It is too bad you didn't ask for the lowest score a post can get because that is more interesting.
Users can still put a negative score of around that 1,172,540 on a post. But after that the community can add an extra negative bonus of -6 if they raise 6 spam flags because a spam flags carry an extra down vote which is given by the Community user. Now I assume that if moderators reverse a spam flag on a post, also the score gets adjusted. If not we've found a way to let a post go even further down.
9,223,372,036,854,775,807
. We have to account for Jon.