Health calculators

Food Calorie Calculator

Updated Jun 9, 2026 By Jehan Wadia
USDA FoodData Central API
Uses USDA FoodData Central. Free keys at api.data.gov. DEMO_KEY works for light testing (rate-limited).
Food Search
Popular Foods
Search by Restaurant Chain
Search Results
Food Name Qty Serving Size Calories Fat (g) Protein (g) Carbs (g) Fiber (g) Sugar (g) Add
Page 1 of 1
Today's Food Log
Food Name Qty Serving Size Calories Fat (g) Protein (g) Carbs (g) Fiber (g) Sugar (g) Remove
Totals 0 0 0 0 0 0
Daily Nutrition Goals
Log Summary
Total Calories
0
Protein
0 g
Carbs
0 g
Fat
0 g

Introduction

This Food Calorie Calculator helps you track what you eat and see how many calories, protein, carbs, and fat are in your meals. It uses the USDA food database, which has nutrition data for thousands of foods, including items from popular restaurant chains like McDonald's, Subway, and Chick-fil-A. You can search for any food, add it to your daily log, and watch your totals update right away.

The tool also lets you set daily nutrition goals so you can see how close you are to hitting your targets. Whether you want to lose weight, build muscle, or just eat better, knowing what is in your food is the first step. Simply search for a food, pick the right match, choose how many servings you had, and add it to your log. The calculator does the math for you and shows your results in easy-to-read charts and progress bars. For a broader look at your daily energy needs, try our Calorie Calculator or TDEE Calculator.

How to Use Our Food Calorie Calculator

Enter the foods you eat to see their calories, fat, protein, carbs, fiber, and sugar. The calculator adds everything up and shows how close you are to your daily nutrition goals.

API Key: Leave this set to DEMO_KEY for quick use. If you search a lot, get a free key from api.data.gov and paste it here.

Search for a Food: Type the name of any food into the search box, like "almonds" or "peanut butter." The calculator will look it up in the USDA food database.

Restaurant Filter: Pick a restaurant chain from the dropdown to only see menu items from that restaurant. You can also explore nutrition for specific chains with our Chipotle Nutrition Calculator or Starbucks Calorie Calculator.

Popular Foods: Click any popular food button to search for it right away without typing.

Search by Restaurant Chain: Click a restaurant name button to quickly find foods from that chain.

Quantity: In the search results table, set how many servings you ate before clicking the Add button.

Today's Food Log: This table shows all the foods you have added. Click the trash icon to remove any item you no longer want.

Calories Goal: Set the total calories you want to eat each day. The default is 2,000 kcal. If you are unsure what your goal should be, our BMR Calculator can help you find your baseline metabolic rate.

Protein Goal: Set how many grams of protein you aim for each day. The default is 120 g. Use our Protein Calculator to find a personalized protein target based on your body and activity level.

Carbs Goal: Set your daily carbohydrate goal in grams. The default is 250 g. Our Carb Calculator can help you determine the right amount for your needs.

Fat Goal: Set your daily fat goal in grams. The default is 65 g. For a complete macronutrient breakdown tailored to your goals, check out our Macro Calculator.

Log Summary: After you add foods, the summary cards and charts show your total calories, macronutrient breakdown, and how much of each goal you have reached.

What Are Food Calories?

A calorie is a unit of energy your body gets from food. Everything you eat and drink gives your body calories. Your body uses these calories to breathe, move, think, and stay alive. If you eat more calories than your body uses, you gain weight. If you eat fewer, you lose weight. Our Weight Loss Calculator can help you estimate how many calories to cut for safe and steady weight loss, while our Weight Gain Calculator can guide you if your goal is to add weight.

Not all calories come from the same place. Food is made up of three main macronutrients: protein, carbohydrates, and fat. Each gram of protein gives you 4 calories. Each gram of carbs also gives you 4 calories. Fat is the most calorie-dense — each gram gives you 9 calories. This is why high-fat foods tend to have more calories per serving.

Protein helps build and repair muscles, skin, and organs. Good sources include chicken, fish, eggs, and beans. Carbohydrates are your body's main source of quick energy. You find them in bread, rice, fruits, and vegetables. Fat helps your body absorb vitamins and protects your organs. Healthy fats come from nuts, avocados, and olive oil.

Two other important nutrients to track are fiber and sugar. Fiber helps your digestion and keeps you feeling full longer. Most people should aim for 25 to 30 grams of fiber per day — our Fiber Calculator can help you find the right target. Sugar gives you fast energy but eating too much added sugar can lead to weight gain and health problems.

Most adults need about 1,600 to 2,400 calories per day, depending on age, sex, height, weight, and how active they are. Active people need more calories. People who sit most of the day need fewer. A doctor or dietitian can help you find the right number for your body and goals. You can also use our Calories Burned Calculator to estimate how much energy you spend through exercise, and our Body Fat Calculator or BMI Calculator to better understand your current body composition.

Tracking what you eat is one of the simplest ways to understand your diet. When you know how many calories and nutrients are in your food, you can make smarter choices. This food calorie calculator uses the USDA FoodData Central database, which has nutrition data for thousands of common foods and restaurant menu items. If you follow a specific eating plan, our Keto Calculator and Fasting Calculator offer additional guidance. And do not forget to stay hydrated — our Water Intake Calculator can tell you how much water you should be drinking each day.


Formulas used

Total Nutrient (per item)
\text{Nutrient}_{\text{total}} = \text{Nutrient}_{\text{per serving}} \times \text{Qty}
Calories from Protein
\text{Cal}_{\text{protein}} = \text{Protein (g)} \times 4
Calories from Carbohydrates
\text{Cal}_{\text{carbs}} = \text{Carbs (g)} \times 4
Calories from Fat
\text{Cal}_{\text{fat}} = \text{Fat (g)} \times 9
Daily Goal Progress
\text{Progress (\%)} = \frac{\text{Nutrient}_{\text{consumed}}}{\text{Nutrient}_{\text{goal}}} \times 100

Frequently asked questions

Is this food calorie calculator free to use?

Yes, it is completely free. The calculator uses the USDA FoodData Central database with a free API key. You do not need to pay or create an account to search for foods and track your meals.

What is the DEMO_KEY and do I need to change it?

The DEMO_KEY is a default key that lets you try the tool right away. It works but has limits on how many searches you can do per hour. If you plan to use the tool often, get a free API key from api.data.gov and paste it into the API Key field.

Where does the nutrition data come from?

All nutrition data comes from the USDA FoodData Central database. This is a trusted source run by the United States Department of Agriculture. It has calorie and nutrient info for thousands of foods, including branded products and restaurant menu items.

How accurate is the calorie information?

The data is as accurate as the USDA database entries. Keep in mind that actual calories can vary based on how food is prepared, portion sizes, and cooking methods. The numbers shown are good estimates, not exact values for the specific food on your plate.

Can I look up restaurant menu items?

Yes. Use the Restaurant Filter dropdown or click a restaurant chain button to find menu items from places like McDonald's, Subway, Starbucks, Chipotle, Chick-fil-A, Taco Bell, Burger King, and Panera Bread.

What does the serving size mean in the results?

The serving size tells you how much food the nutrition numbers are based on. It could be in grams, ounces, or a household measure like "1 medium" or "1 cup." When you set the quantity to 2, for example, all the nutrition values double.

Can I add the same food more than once?

Yes. You can add any food to your log as many times as you want. Each entry shows up as a separate row. You can also adjust the quantity before adding to account for larger or smaller portions.

How do I remove a food from my log?

Click the red trash icon next to any food in the Today's Food Log table. That item will be removed and your totals will update right away.

Does the calculator save my food log?

No. Your food log is not saved when you leave or refresh the page. If you want to keep a record, write down your totals or take a screenshot before closing the page.

What daily calorie goal should I set?

The default is 2,000 calories, which works as a general starting point. Your actual needs depend on your age, sex, weight, height, and activity level. Most adults need between 1,600 and 2,400 calories per day. Talk to a doctor or dietitian for a personalized number.

What do the progress bars under Daily Nutrition Goals mean?

Each bar shows how much of your daily goal you have eaten so far. For example, if your calorie goal is 2,000 and you have logged 1,000 calories, the bar will be at 50%. The bars fill up as you add more food to your log.

What is the difference between the two charts in the summary?

The donut chart shows how many grams of protein, carbs, and fat you ate. The bar chart shows how many calories come from each macronutrient. Fat has 9 calories per gram while protein and carbs each have 4 calories per gram, so even a small amount of fat can contribute a lot of calories.

Why does my search return no results?

This can happen if you misspelled the food name, used a very specific term, or hit the rate limit on the DEMO_KEY. Try a simpler search term, check your spelling, or wait a minute and try again. Getting a free API key from api.data.gov will reduce rate limit issues.

Can I search for homemade or cooked foods?

Yes. The USDA database includes many cooked and prepared foods. Try adding words like "cooked," "baked," "grilled," or "raw" to your search to find the right version. For example, search "chicken breast grilled" instead of just "chicken."

What happens when I click the Calculate button?

The Calculate button updates all your totals, goal progress bars, summary cards, and charts based on the foods currently in your log. It recalculates everything using your latest goal settings too.

What does the Reset button do?

The Reset button clears your entire food log, search results, and goal settings. It puts everything back to the default values. This gives you a fresh start so you can begin tracking a new day.

Why do some foods show 0 for certain nutrients?

Some entries in the USDA database do not have complete data for every nutrient. A zero may mean the food truly contains none of that nutrient, or it may mean the data was not available. This is most common with fiber and sugar values.

Can I use fractional quantities like half a serving?

Yes. The quantity field accepts decimals. You can enter 0.5 for half a serving, 1.5 for one and a half servings, or any other number. The minimum step is 0.25.