How to Gain Weight

To put it the simple way, calories in > calories out (surplus calories).

A more detailed explanation would be: each people has their calorie expenses each day. People with different body composition and size will have different result. Someone heavier or taller, or someone with more lean mass, burns more calories at rest.

Our body has BMR (Basal Metabolic Rate), which measure how much our calories burned at rest. We also have NEAT (Non-exercise Activity Thermogenesis), the energy expended for everything we do that is not sleeping, eating, or exercise. NEAT is everyday movement, which burns more calories than a workout do.

There are smaller important factors that affects how much energy digestion uses, such as sleep and stress, hormones, and how efficiently food is digested.

Thin people often overestimate how much they eat in a day. Average BMR is around 1500kcal a day. If you lift several times a week and fairly active, the total can reach 2600-3000 kcal. So 3000 kcal is only enough to maintain your weight.

People also might be compensating without noticing. You eat a lot today, but eat less tomorrow, which cancels out the surplus. Consistency is the key.