As we age, the loss of muscle mass may seem unavoidable. But exercise and better eating habits can slow or even reverse the trend.

Sarcopenia — the proper term for age-related loss of muscle mass — usually kicks in around the age of 40 and progresses gradually as you age. Eventually, the lack of strength that results can make walking more difficult, and lead to difficulties with balance and overall stamina.

“As you age, your body goes through certain changes that play a major factor in developing sarcopenia,” according to the Cleveland Clinic. “Your body doesn’t produce the same amount of proteins your muscles need to grow. When this happens, your muscle cells get smaller.”

So what can you do to slow the loss of muscle mass — or reverse any losses you experienced already? According to experts, a combination of exercise and diet can make a huge impact. For the diet side of the equation, we’ve got four areas you should concentrate on, according to Yahoo! Life.

Getting enough calories

Macronutrients — fat, fiber and carbohydrates — are necessary components of food that allow the body to maintain cell structures.

This is an important reminder to eat up. You’re trying to maintain muscle mass, not squeeze into skinny jeans, so don’t starve yourself. You need to consume enough calories for your body type. Simple caloric intake calculators like Calculator.net — or a talk with your doctor or nutritionist — can help you find a good number.

Proteins

As noted above, the body produces less protein as we age, so it’s important for your diet to make up for the shortfall. Focus on complete proteins. They’ll help build muscle, but won’t leave you feeling hungry like some incomplete proteins (which lack some amino acids).

Sources of complete proteins include fish, poultry, eggs, dairy products, beef and pork, and soy products like tofu.

Getting more protein can also help with weight management.

Eating high-quality carbs

Once you’ve upped your protein intake, it may be tempting to jump onto one of the trendy low- or no-carb diets. But cutting out carbs is only doing your body a disservice.

“Carb restriction will cause muscle loss, and no carbohydrates means your body has to start breaking down its own muscle for energy,” explained dietician Johna Burdeos, RD to Yahoo!

Instead focus on eating the highest quality carbohydrates. Unprocessed or minimally processed whole grains, as well as fresh vegetables and fruits, combine the carbs you need with plenty of nutrients.

Vitamins

When it comes to maintaining or regaining muscle mass, you might want to check your vitamin levels at your next doctor’s visit.

Omega-3 fatty acids and vitamin D are key components for maintaining muscle mass as you age. But the Cleveland Clinic reports that about 1 billion people worldwide have a vitamin D deficiency.