Carbs = the remaining calories after protein and fats. 1 g protein/carbs = 4 kcal, 1 g fat = 9 kcal.
Mifflin–St Jeor: BMR = 10·weight(kg) + 6.25·height(cm) − 5·age + s, where s = +5 (male) / −161 (female). TDEE = BMR × activity factor. Target calories = TDEE × (1 ± intensity).