The present disclosure provides a system that quantitatively tracks an individual's diet and exercise using smart devices (phones, watches, and other wearables). Unlike existing programs, which work in energy units (calories), the present system works in mass units (grams) and satisfies the fundamental physics law of conservation of mass. Food ingested is tracked as well as exercise in order to place the user on a quantitative, custom diet that safely and effectively results in weight loss. In addition to rigorously treating the problem of weight loss by addressing the physics that underlies diet and exercise, the system empirically learns about the user over time such that performance may be optimized.