How your calorie needs are calculated
The calculator starts with the Mifflin–St Jeor equation, which estimates your basal metabolic rate (BMR): the calories your body burns at rest just keeping you alive. It's built from your sex, height, weight, and age. Your BMR is then multiplied by an activity factor, from 1.2 for a mostly sedentary day up to 1.9 for very hard training or physical work, to get your total daily energy expenditure (TDEE), the calories you'd need to maintain your current weight.
Reading the goal targets and macros
The goal list adjusts your maintenance calories up or down by roughly 250 or 500 calories a day, which lines up with losing or gaining about half a pound or a pound each week. The protein, carb, and fat grams shown are a 30/40/30 split of your maintenance calories, not your goal calories, so they represent a reasonable everyday target regardless of which goal you're working toward.
Caveats worth keeping in mind
The Mifflin–St Jeor equation is one of the more accurate population formulas, but it's still an estimate: it doesn't know your body composition, medical history, or how your metabolism responds to a calorie deficit over time. Treat the number as a starting point and adjust based on how your weight actually moves over two or three weeks. Don't drop below about 1,500 calories a day for men or 1,200 for women without guidance from a doctor or dietitian.