While there are subtleties involved like protein and carb intake, ultimately, losing fat or gaining muscle comes down to one thing: calories in versus calories out. MyFitnessPal for the iPhone is one of the most popular tools for managing this, and here's how to use it.
Whenever you load MyFitnessPal, the first thing you'll see is the Home screen, at the top of which is one form of that critical equation. To make sense of it, though, there's a bunch of things to set up first.
Tap on the More button at the bottom, and you'll see a plethora of options. We only need to bother with a few of them, beginning with My Profile, where if you haven't already you can enter details like your height, birthday, and your preferred measurement schemes for height, weight, and food.
The most important option under the More menu though is Goals. This is where you can set your current weight, activity levels, and goal weight, as well as how fast you're planning to get there. Notably, unlike some weight tracking apps, you can set gaining weight as a goal. Know of course that the faster you plan on going, the more work you'll have to do, whether in terms of workouts or proper eating.
You can also set how often you'd like to exercise each week, and a minimum level of time to spend, but this is purely optional -- where you really need to head next is Calorie & Macronutrient Goals.
Here you can pick how many calories you want to end up with each day, which is what most people will likely be concerned with. The trick is to figure out your total daily energy expenditure (TDEE) using an online calculator or a fitness tracker, and set a target above or below that depending on your plans. If you're trying to lose weight, the number should be about 500 calories or more below TDEE -- for lean gains, probably 200 to 500 above.
If you don't remember anything else though, remember this: a heart rate-capable fitness tracker like the Apple Watch or a Garmin is probably your best bet for estimating TDEE, because that number can vary wildly in practice. You might burn 3,200 calories on a gym day, for example, but only 2,200 on a day off. If you wanted to lose weight in those scenarios, you'd have to eat 2,700 calories on the first day but only 1,700 on the second.
The Calories & Macros menu also lets you set what percentages of carbs, protein, and fat you'd like to strive for. This is mostly important for people working on muscle, but a good rule of thumb is that you want 1 gram of protein for each pound in your target weight, and to keep carbs low for fat loss. Keeping them up, conversely, is essential to fueling workouts when bulking.
Before we can get to the core of the app, be sure to link any outside fitness apps to MyFitnessPal so it can automatically input calories burned, or your weight if you have a smartscale. Typically this is done through one of the supported apps from companies like Fitbit, Garmin, or Polar, but you can always fall back on Apple's HealthKit. The More menu's Apps and Devices area provides a handy shortcut to HealthKit and other items if you search for them.
Finally we can tap on the Diary tab you likely noticed earlier. This is where you'll spend most of your time from now on, logging all of your daily food consumption.
The Diary is broken down into several sections, namely Breakfast, Lunch, Dinner, and Snacks. Tapping Add Food lets you manually add items to each section, or to save time with consistent diets, you can swipe right on one of the "Add Yesterday's..." bars to automatically populate a section.
Since we're assuming you're a first-time user though, we'll go the manual route. After selecting Add Food, you'll see options to search for items in the app's database, including recent and frequent items, as well as meals and recipes you've composed. We'll leave the latter two options alone, since those are advanced features.
Next to a text search bar up top are icons for location- and barcode-based searches. The former lets you find items at a nearby restaurant -- if it supports MyFitnessPal -- while the barcode option brings up a scanner that can make first-time additions much, much easier.
Down below you'll see a Multi-Add option, which can likewise make entry easier so long as you're staring at a populated list.
When you add a single item, you'll see a breakdown of its calories and nutrients, along with options for changing serving sizes and the number of servings. Be sure to make this as accurate as possible, because getting your servings wrong could cause you to over- or underestimate your calorie intake. We recommend getting a cheap kitchen scale to help.
In one sense, that's about it. If you go back to the Home screen, or the front page of the Diary, you'll see how far you are from your calorie target with food and exercise factored in -- adjust your real-world behavior accordingly. Remember again that if you have a fitness tracker, your actual goal should be relative to the calories it says you're burning, rather than a flat, unchanging number.
As a final note: To make the most of the app you'll have to log in every day, or at least until your diet and exercise routines become fully predictable. Be sure to update your weight, and check out the Nutrition button towards the bottom of the Diary to see how your macronutrients are doing. If you can't hit the protein or fat levels you need, you'll have to eat more -- and maybe do some more exercise if that's required to balance things out.