From tomorrow, the lighter evenings will be tempting us to venture outdoors. But, if you're doing any serious walking, there are a few tips to bear in mind. If only I'd remembered Naismith's Rule, laments Frank Partridge...

"Just make sure we get to Titley by 8.45 sharp on Saturday evening." That was the only instruction I was given as I pored over maps and books to plan a walk along the 1,200-year-old earthwork that helped the Saxons of Mercia achieve what generations of English rugby teams failed to do: namely, prevent the Welsh from penetrating their defences.

"Just make sure we get to Titley by 8.45 sharp on Saturday evening." That was the only instruction I was given as I pored over maps and books to plan a walk along the 1,200-year-old earthwork that helped the Saxons of Mercia achieve what generations of English rugby teams failed to do: namely, prevent the Welsh from penetrating their defences.

The reason for my companion's insistence on such a precise deadline in an obscure Herefordshire hamlet one summer weekend was the table he had triumphantly booked at Titley's Stagg Inn, the first pub in Britain to earn a Michelin star. Eight forty-five it would have to be then. I settled to my task.

Seven eighty-five was more like it, as far as Offa, the King of Mercia, was concerned. That was the year he is thought to have ordered the construction of the dyke that followed the line of the rolling hills flanking his western boundary. This Iron Curtain of the Dark Ages runs between what we now call Prestatyn and Chepstow, connecting the Irish Sea with the Bristol Channel and measuring 177 miles – more than twice the length of Hadrian's Wall.

Being of the Dark Ages, however, Offa's handiwork is much more mysterious than Hadrian's. Archaeologists and historians still argue about its precise route, date of construction, purpose and life-span. There are sections where it disappears altogether, or suddenly changes course for no apparent reason. There is a curious absence of roads or fortifications nearby, perhaps indicating that it was more of a symbolic divide than a military one. No records survive of who laboured on it, how much it cost, or why it fell into disuse after less than a century.

But Offa's legacy is indestructible. Like a line of foam left by a wave on virgin sand, the dyke threads its way over hump and hollow, hill and forest, river valley and high escarpment, announcing to ancients and moderns alike that this was the work of formidable men.

To the contemporary eye, the dyke is modest in size. Originally, it consisted of a ditch (on the Welsh side) and a rampart, measuring about 90ft across and 25ft from the bottom of the ditch to the top of the bank. Creeping vegetation, erosion and farming have reduced those dimensions and lessened its impact on the landscape.

But to 8th-century tribesmen enviously eyeing the fertile pastures to the east, the dyke would have seemed positively monumental: quite out of scale with the rest of their physical experience; as awesome and incomprehensible as if a time-travelling Victorian were to be shown the skyline of Manhattan.

Even if the earthwork saw little military action, like the Iron Curtain it may well have done its job just by deterring it. A recent London University study shows that whereas English and Fresian people are genetically indistinguishable, a clear divide can be detected along the English-Welsh border. The Anglo-Saxons had driven the Celts to the west, and that is chiefly where they stayed. The dyke, it seems, was more of a genetic barrier than the North Sea.

In both human and political terms, the modern border between England and Wales is of much less consequence, and the long-distance footpath that follows the general course of the dyke crosses from one country into the other and back again a dozen times. Viewed on an Ordnance Survey map, its course seems as straight and predictable as a Roman road. And that was where I came unstuck.

Planning the starting point of the walk that would get us to our table on time, I visualised a relaxed stroll at three miles an hour. How could we go wrong? Eight hours' walking would take us 24 miles, and we could add some time to call in at the George and Dragon in Knighton, the town that marks the halfway point between the Irish Sea and the Bristol Channel, and houses a fine exhibition centre that brings the dyke's history to life.

I measured 24 miles north of Titley on the map, and alighted on a spot where the road crosses the dyke, near Clun in southern Shropshire. But as soon as we set off we realised there was a problem: the dyke runs north-south, but the natural grain of the rolling landscape is east-west. Offa did not have ramblers in mind when he drew up his plans, and I had overlooked the contour lines.

In order to impress the dyke's impregnability on his troublesome neighbours, Offa made sure they would never miss it. So instead of skirting round the hills as a modern motorway would, his route seeks out just about every summit and high ridge he could find. The result is a switchback effect of lung-bursting climbs and sharp descents.

So, straight away, we found ourselves climbing to the highest point of the entire construction, near Llanfair Hill, not far below the clouds at 1,408ft (429m). This is officially an Area of Outstanding Natural Beauty, but our breathing was laboured, our heads were down, and I'm not sure we concurred. It took us an hour to clear the summit, and a further hour to drop down to Garbett Hall and climb the next of Offa's little testers, Cwm-sanaham Hill: 1,343ft (409m). We had advanced precisely two miles. At this rate, we wouldn't make the Stagg Inn in time for breakfast, let alone a Michelin dinner.

If only I had been prepared, and consulted the Scouts' website for a reminder of Naismith's Rule. Hill walkers, climbers, fell runners and outdoor types the world over swear by a system devised by the Scottish mountaineer WW Naismith in 1892 to forecast how long a hill walk will take to complete. In its original form, the rule assumed a steady walking pace of 20 minutes for every mile of horizontal distance – the three-miles-an-hour I had planned. But Naismith added a crucial supplement: three minutes for every 100 feet of ascent.

His basic rule has been much modified over the years. Metrically minded Scouts, slowed by the weight of their backpacks, have tempered Naismith's optimism to three kilometres per hour on the flat, and just 300 metres per hour on the climb. A university professor's research came up with a more precise, gender-specific relationship between distance and height. He calculated that the average man takes as long to climb one metre as he takes to walk eight metres on the flat, while women have a climb-to-flat ratio of 1:9.5. And finally there's Tranter's Correction, which factors in variables such as fitness (in our case, low-to-middling); fatigue (growing with every hill); loads (how I cursed my packed lunch); bad weather (thankfully, not a factor on this occasion); and stops for photographs and sightseeing (frequent).

If only I'd known. If only I'd applied the rule and a correction or two, I would have chosen a walk half the length of the one we now faced. There was still a long, long way to go, and as the sun seemed to race across the sky we proceeded at the pace of languid snails who've lunched well.

But gradually the landscape became more rolling; the rhythm of our walking steadier. We even began to enjoy the views. On the bare ridge approaching Beacon Hill, we felt – and were – on top of the world. As we dropped towards the town of Knighton and the Teme Valley, a train crossed a distant viaduct on the glorious Heart of Wales line, and we were instantly transported to Toytown.

Regretfully eschewing the pub, we ate our sandwiches under the trees in a high meadow, observed by curious cows. A yellowhammer swooped by. The country smells reminded my now limping companion of his first kiss in a hay rick at the age of 13. Such sights and memories invigorate the weariest of men. He employed another boyhood skill, whittling a piece of hazel into a walking-stick, and we trudged on.

By mid-afternoon, the landscape spread out before us as if arranged by Breughel. The thin spine of the Malvern Hills 30 miles south-east; the ridges of the Brecon Beacons a similar distance south-west. At points where the dyke disappeared or wandered away from the path, we became adept at reading the route notes that I had pored over at the planning stage: "Over road and stile, at first with fence on R, then bear L through gorse to reach and follow farm track to gate and stile."

Sure enough, stiles, fence, gorse and gate appeared precisely on cue, faithfully logged by an anonymous volunteer who had walked, notebook in hand, in goodness knows what weather, to keep us on the right track. Half a mile on, as we hauled ourselves over yet another stile, the dyke reappeared, and we greeted it like an old friend.

The sun began to drop: must keep going. Conversation was monosyllabic, concentration all. The evening rays fanned out to form sharp shadows over the sweeping Radnor Valley to the west, before we negotiated the final climb of 1,200ft (360m) to Herrock Hill, slowing to little more than a shuffle. But somehow we had made up the lost time, and a nifty detour through field and farm cut off a corner and took us into Titley just as the village was enveloped by the first shivers of dusk.

It was 8.44pm. We were blistered, lame, unwashed, almost beyond weariness – but we'd made it, despite our ignorance of Naismith, with one minute to spare. "Been anywhere interesting?" asked the landlady, as we took our table.

Naismith's invaluable legacy

The man behind the hillwalkers' rule

William Wilson Naismith is remembered as the inventor of a rule to calculate how long a hill walk would take to complete. He was born in Hamilton, near Glasgow, in 1856 and worked in insurance all his life, but was also a keen mountaineer, rock climber, skier and meteorologist.

He led many early first ascents of Scottish mountains, and climbed in the Alps, Norway and the Middle East – he even climbed all three of the great pyramids of Egypt. In 1889 he lobbied for a climbers' association, which led to the formation of the Scottish Mountaineering Club.

Naismith also loved winter sports. He promoted Scottish skiing, and at the age of 54 he skied down Ben Nevis's Red Burn Gorge.

He was also deeply religious. When he retired, he worked for 20 years as treasurer for the National Bible Society of Scotland, which distributed Bibles to impoverished Highland crofters and among residents in the tenements of Glasgow.

Despite the considerable risks that mountaineering involved a century ago, he lived to the age of 79.

Toby Shergold

Traveller's guide

Getting there: Offa's Dyke is surprisingly easy to access by train, with several lines criss-crossing the course of the walk. With a bit of planning (preferably using Naismith's Rule) you can organise a hike that goes from one station to another, solving the problem of where to leave your car. National rail enquiries: 08457 48 49 50.

Essential information: if you have access to the internet, the website is an excellent source of information. It includes contour maps of the entire path, which is handy when calculating walking times.

The section of the walk described, from Newcastle in southern Shropshire to Hay-on-Wye in Herefordshire, is covered by Ordnance Survey Explorer map number 201: Knighton & Presteigne; Tref-y-Clawdd a Llanandras; Kington & Hay-on-Wye. The scale is 1:25,000, the price £6.99.

The Offa's Dyke Centre (01547 528753; at Knighton – halfway along the trail – is open 9am-5pm from Monday to Friday out of season, and 9am-5.30pm daily from Easter to October, admission free.

The centre can supply details of companies that organise walking trips along Offa's Dyke, and sells a wide range of guidebooks to the path.

Staying there: the Stagg Inn (01544 230221, at Titley, near Kington, Herefordshire, opens for meals daily except Mondays. It also offers single rooms including breakfast for £40 per night, doubles from £70.