I get a lot of questions about focusing; generally, the first thing people do is blame the equipment. Step back; look at your lens, and body. Make sure it is the equipment. Many times it is “user” error. Now there are all types of focus tests that state they are accurate, but again user error can prevent this from being the truth.
Things to note and observe:
What is your ISO? (Set around 200), make sure you have plenty of natural light
What is your shutter? (Needs to be high to eliminate the possibility of camera shake)
Are you on a tripod?
If you have Vibration Reduction, is it off?
Make sure you are on AF-S (Single Servo), with a single point of focus selected
Now, just because focus may be off, does not mean a malfunction of the equipment. Many companies allow equipment to be backwards compatible; this allows those that have been shooting for years to use older lenses. And although these lenses will connect and work, technology has advanced and auto focus has improved. An older AF lens, while it may work in most situations, might not have perfect focusing every time. Due to improvements in auto-focus technology, you may find shooting situations where an older lens, any lens previous to AF-S technology, does not appear consistently sharp. This is the result of technology growth with the auto-focus system.
Lenses can be tested by the company and checked to make sure they are within specs. If they do not find an issue or something wrong; realized that you are probably exceeding the capabilities of the lens or that it may be the contacts on the camera body that need to be looked at or that it may be user error.
Searching online for “lens focus tests” you will find many that offer advice and how to do this properly. Below are a few that may work for you.
The Test (from photo.net)
To use the chart you set it up at 45 degrees to the axis of the lens as shown below.
Once you have everything setup you select your focus point (use the center point) and make sure the focus area/zone includes only the single focus point. Then you take your shots. Take several and refocus each time. Try several manual focus shots also. Use the maximum aperture of your lens so as to get minimum DOF.
The picture above gives you the basic knowledge to attempt a focus test. Again, make sure you follow the instructions.