Adaptive thermostats model this internally through observation. Through trial and error they learn how long it takes the home to recover and then adjust how long in advance to come on accordingly.
For you to do it by any means other than observation? Wow. That's some complex math. Outdoor temperature and humidity have their roles. But I would imagine that the number one factor that we can't measure easily is mass. Heating the air takes no time at all. It's the substance of the home and its contents that takes a long time to heat. How on Earth you'd calculate that, I don't know.
That complexity is probably why Manual J calculates equipment size based on maintaining a certain temperature in the home rather than recovering from one. Once the mass of the home is at a certain temperature then maintaining that temperature has everything to do with insulation values and outdoor temps and less to do with the mass of the home. As far as I know, there's no conventional software that calculates recovery time. If your equipment is sized properly, your setback is low and if the home chills down then it can take a seemingly long time to recover even if everything is working right.
Anywho, I'm not much of a scientist. Just giving my 2 cents.