Both, and factor in the weather, daylight hours, the conditions underfoot etc.
e.g. :
- walking from home (which is mainly across fields and through woods) - I generally plan on half a day, as the scenery isn't that fascinating. Then I plan a route that will take me around half a day.
- a day in the Lakes/Snowdonia in summer - pick a summit or ridge I haven't done for a while, work out a nice circular route, measure the length and see if this sounds feasible given my current hill fitness (for example, I could do 20 miles over the hills, but I'd be getting down in the dark, and the last 5 or more miles would not be fun).
- a day in the hills in winter - check timing so that the only bit (if any) to be done in the dark is easier ground at lowish level/track/road walking, or is on a route I know well