In reply to Swirly: You are correct that calories are a measure or energy, but your assertion that time makes no difference is only true in certain circumstances.
Moving a mass a certain distance actually requires no energy at all because work = force*distance. If the mass is moving at a particular speed and requires no force to continue moving at that speed then no energy will be consumed no matter how far it moves.
If however you are going vertically upwards, then you must apply force to overcome gravity. To maintain a steady speed you must exactly match the force of gravity, so the force is m*g and the energy is just m*g*h where h is the vertical distance moved. In this situation, the distance is indeed the only variable.
However, the energy you lose cycling up a hill, you get back by descending it (kind of, obviously it doesn't refill your stomach, but if does give you 'free' speed). Most of the energy you actually expend on a bike is lost to air resistance. Air resistance is greater the faster you travel, but rather tha being proportional to speed it is proportional to speed squared. This means that if you travel a fixed distance very fast, you will lose more energy than someone travelling the same distance very slowly. Therefore calories are critically dependent on speed AND distance.