We extend the existing literature on food taxes targeting obesity. We systematically incorporate the implicit substitution between added sugars and solid fats into a comprehensive food demand system and evaluate the effect of taxes on sugars and fats. The approach conditions how food and obesity taxes affect total calorie intake. The proposed methodology accounts for the ability of consumers to substitute leaner low-fat and low-sugar items for rich food items within the same food group. We calibrate this demand system approach using recent food intake data and existing estimates of price and income elasticities of demand. The demand system accounts for both the within-food group substitution and the substitution across these groups. Simulations of taxes on added sugars and solid fat show that the tax impact on consumption patterns is understated and the induced welfare loss is overstated when not allowing for the substitution possibilities within food groups. Copyright © 2012 John Wiley & Sons, Ltd.