This calculation is based on the formula I found in this forum post.