There's no general rule of thumb that I know of...
I lied, there is Naismith's formula as correctly cited in another answer. I just tend to stay away from it because more often than not I find it better to make a judgement on the individual situation. There's so much variation the "average" would almost always be wrong in any specific case! It depends on all sorts of things, from the fitness of the individuals involved, whether the individuals are talkative and thus (usually) walking slower, how often people require rest breaks, how long those rest breaks are, any health problems that could impede progress - and so on.
Having said that, if you think the hike is average-ish in terms of conditions, you don't have a better way of judging and all you're using it for is wondering when you're going to reach point x (for reasons of curiosity not safety) then it does have its place!
More experienced hikers that know their speed, ability and fitness can have a rule of thumb for themselves based on weather, terrain and so on, but this varies again varies from person to person. It's even hard for experienced hikers to make a guess when they don't know the area or the terrain - sometimes land that looks easy going on a map can be rocky, boggy or just plain awkward!
Where this kind of question does come into play most often (at least that's what I find) is when either hiking out for the first time, or taking inexperienced people out for a hike (because you obviously have to go at the pace of the slowest person.) For this, and best on the fact I generally wouldn't recommend climbing ridiculous terrain for this type of outing (if nothing else it'll put them off!) I tend to have in my head a rough average speed of around 3 KPH. It's slow - but far better to have that in mind and get back early than have a faster speed in mind and get back late, especially if after dark. It's not just the safety aspect, it's the morality as well; if you give people an estimated finish time and you complete an hour ahead of schedule they generally view it as an achievement and therefore a more positive experience overall! (Of course, don't take this to ridiculous levels. If you plan an all day hike that takes half an hour, people will just feel a bit misled!)
Another thing to point out in relation to this, if you have a speed / route in mind and you realise it's over-ambitious, don't be afraid to change your route so it's shorter. Much better to cut a bit off and have a successful day than push yourself and end up getting lost or injured.