|Distance:||17.1 miles (27.5 km)|
|Meets:||A91, B939, B941, A915, B9131, B9171, A917|
|Route outline (key)|
The B940 is a cross-country B-road in east Fife.
It starts on the A91 on the eastern side of Cupar town centre. It heads roughly eastwards along Pitscottie Road, zigzagging across the River Eden and the railway line from Edinburgh to Aberdeen before leaving town.
The road climbs out of the valley and crosses a spur to descend to reach the Ceres Burn, which it crosses in Pitscottie, just before crossing the B939 and climbing once more. The climb becomes less steep at Baldinnie where the road bends sharply left. A couple of miles further on the road reaches Peat Inn where the road TOTSOs left, with the road ahead being the B941. After roughly the same distance again the A915 is met; this is crossed at a staggered crossroads.
The road continues east across the fields. After crossing a valley the road begins to descend. The B9131 (former A959) is crossed at a staggered crossroads, where the road on the far side appears to have been deliberately skewed. After passing the secret bunker the road bends sharply a few times and reaches the B9171. For the first time the B940 has priority. Not long afterwards the road bends to the right to end at a T-junction on the A917 to the north of Crail.