EDIT:
Given the amount of attention the math on this comic has received, if you really want a version with math that works out a little better… ask and ye shall receive.