Every ranked Dota 2 player knows that more wins equals more MMR, but that hardly tells the full story. In Dota 2, MMR is calculated based on a variety of factors.

MMR calculation happens every season, but after a player has already been calculated once their MMR will always be a reflection of that. So if in the past you were ranked at Divine but then lose all 10 placements, you won't suddenly drop to Herald, instead the game will take into consideration your previous peak skill and adjust based on that.

However calculating a fresh MMR in ​Dota 2 is a whole other beast entirely. Now, before going into the specifics of it it's important to make a distinction between two concepts: visible MMR and hidden MMR. The biggest difference here is that visible MMR only affects which teammates and opponents you will queue into in Ranked matches only. Invisible MMR affects this in normal matches. Many stat tracking sites (like dotabuff, etc) will display the rank of a normal match. Dotabuff does it by classifying matches as normal skill, high skill and very high skill. Invisible MMR never really drops, in an attempt to prevent smurfs/account boosting.

So with that out of the way, here's how MMR is first calculated. In your first ever match of Dota 2, you are assigned randomly to a "normal skill" match, so somewhere in the 2k-3k range (Crusader/Archon). After that, Valve makes sweeping adjustments based on performance in subsequent games. A good player will quickly skyrocket to higher invisible MMRs, as the game is trying to figure out where to place them and will make large adjustments.

Players will increase in MMR based on pretty much everything that can be quantified: hero damage, creep score, kills, deaths, gold per minute, etc. These are all just as important as to whether or not a match was won. And so when a player is finally ready for ranked, the game has a pretty good idea of where that player will stand in a ranked game, so for the first match it places them in a ranked skill bracket equivalent to the invisible MMR value. In the following placements, MMR will change more drastically than after the MMR is made visible. The more matches a player has will determine how much MMR is gained/lost during placements.

After placement, the MMR change in a given match is pretty easy to figure out. The game will add up the separate MMR totals from each team and place a "bet" on which team is more likely to win. If that team wins, they get less MMR, and if the other team wins they will get more MMR because game predicted they would lose. 

To sum it up, MMR gain and loss is weighted more heavily the less matches a player has. Invisible MMR factors into initial ranked placement, but not after, as MMR gain and loss after a ranked match solely depends on the average MMR of the match.

Photo courtesy of Valve