The algorithm we use is called Glicko-2 and is similar to the systems used by Baseball Prospectus and by the US Chess Federation. If you're interested in the gory details, click here, but the math might be scary. Don't complain that we didn't warn you.