From Roader's Digest: The SABRE Wiki
When road numbers were first allocated, no roads in the City of London itself were classified. Consequently, the A40 started at the edge of the boundary between the cities of London and Westminster, just east of the A5200. Later on, it was extended back along Holborn, Cheapside and Poultry to terminate at Bank, meeting the A3, A11 and A501.
Today, the A40 runs as far as St Martins Le Grand, where the only other classified road is the start of the A1. None of the A40 inside the Inner Ring Road is signed with its number.
Marble Arch - Denham
The original route of the A40 west from Marble Arch went via Bayswater Road, Holland Park Avenue, Shepherd's Bush Green and Uxbridge Road. In the 1950s, it was rerouted up Wood Lane and onto the former A403 along Western Avenue as far as Denham, where it rejoined the original route. The old road was renumbered the A4020.
The A40 originally met the A418 east of Wheatley at a T junction. When the first section of the M40 was opened, it ended at a temporary terminal that ran back onto the A40 mainline. The current junction layout dates from 1991 when the M40 was completed, and involves the A40 taking over a short section of formerly unclassified road to meet the A418 in a different location.
Ross on Wye - Abergavenny
The original 1922 route of the A40 ran along what is now the A49 and along the B4521 to Abergavenny. It was re-routed via Monmouth in 1935, taking over a section of A48 as far as Raglan, followed by a section of B4234 and A471 . The re-routing extended the A49 by about a mile.
Llandovery - Llangadog
The A40 originally ran south of its current line along what is now part of the A4069, rejoining its original route west of Llangadog.
St Clears - Narberth
The original line of the A40 ran along what's now the eastern end of the A477 as far as Red Roses. It then ran along the current B4314 through Narbeth to rejoin its current route at Robeston Wathen. By the end of the 1920s, the A40 and B4314 had effectively swapped places.