Purchased a piece of software recently that was used by the chap that calibrated my cameras & lenses, FoCal, I am not going to pretend that I understood half of what the graphs & charts mean, but the important thing is that in the end it gives you a value for the AutoFocus calibration, which means that what ever you point your camera at, should be in focus.
Essentially you set a target, set your camera on a tripod pointing at the target from a specified distance (depending upon focal length) plug in the computer to the USB port on the camera & the software does most of the rest. Some cameras have more automation than others, with Canons the software will tell you to enter various adjustments usually starting with -20 then -10 etc up to +20 it then calculates the value required & homes in on it.
For prime lenses it takes about 10 minutes per lens, with zooms a little longer (on Canons) as you have adjustments at the Wide end & the Tele End of the zoom.
So I have calibrated three lenses on three bodies, just a few more to do. Mind I think I may have to retire to the garden to do the 400mm.