Javascript calculator for estimating weight loss over time