Really all the complicated algorithm here is estimating basal metabolic rate - the "amount of energy expended while at rest in a neutrally temperate environment, and in a post-absorptive state (meaning that the digestive system is inactive, which requires about 12 hours of fasting)". That quote comes from the BMR calculator I use, which also explains clearly the different estimation methods and their variables [1]. Their calculator takes sex, weight, height, age, and body fat percent.
Other than your BMR, you can compute (weight loss / day) with 3 more variables, the activity calories per day (just added to your BMR), the number of calories in a pound of fat (most round to 3500kcal because it makes mental math easier), and the calorie intake per day. Then:
NET_DAILY_KCAL = (BMR + ACTIVE_CALS) - INTAKE
WEIGHT_CHANGE_RATE = NET_DAILY_KCAL * FAT_PER_KCAL
[1]: https://www.calculator.net/bmr-calculator.html