I want to find out how many calories are burned on any particular hike by any particular by using a formula. I figure it's probably a simple physics question, but since I never took physics, I don't know the math to do it. 

My premise is that you will expend (A) energy (calories) when moving (B) weight (C) distance on a level path. And also (X) energy (calories) when moving (Y) weight (Z) distance when moving up against gravity. 

The formulas I have found will add (A)+(X) to get the totals calories burned. Trouble is, the results vary greatly, and I have no way of judging which one is right.

Now, I know there lots of variables, but for this exercise, we'll skip the small ones. Here's what I'm thinking:

1. Obviously there's resistance. At first I was dismissing resistance as being too minor when only traveling 2-4 MPH, but then I realized that without resistance, we'd just keep moving. Now, resistance will be based on the front profile size. Can we simplify things by saying X weight = Y profile?
2. Assuming X weight = Y profile. A backpack would add weight, but not added profile. So we'll say no added weight for the formula.
3. Up & down motion for each step. I figure that makes the formula a lot more complex because we have to deal with the height & stride of each person. So I guess we'll skip that.
4. A fit person burns less calories (more efficient muscles) than an out of shape person doing the same hike. So we'll pick a good average.
5. Downhill is considered the same exercise as level walking.
6. Age & sex may be a factor, but I don't have those numbers, so can be ignored for now. I may later ask on a health forum for those factors.
7. There's probably others I haven't thought about.

There are many sites on the internet that calculate this for you, but there's 2 problems with them.

1. The majority want to ask you your hiking speed and time hiked. But
most people don't their hiking speed, and some sites are vague with
"brisk walk". Then all they do is convert speed with time to get
distance.
2. Even the ones that factor weight, distance, & elevation gain, I get widely different answers.

So, what I would like to get, if someone is in the mood to figure it out, is a formula for calculating calories burned. 

Thanks