I have a Canon 7D with a 50mm f/1.4 lens, and I think the auto-focus of the lens is off. How can I test and adjust this reliably?

Will this approach work with all of my lenses? If I had a different camera body, would I have other/different options?

  • 5
    \$\begingroup\$ I just wanted you to make a note about this focus adjustment procedure. Every camera body and lens has a tolerance to which they can be manufactured. Therefore, when you adjust that lens (after determining that it indeed does not focus correctly), it will work for your case for that particular camera body. When you put that very lens on another camera you will notice that it will back/front focus again. Therefore, any of these adjustments must be done for a lens/body combo. Do note :) \$\endgroup\$
    – gontadu
    Commented Oct 18, 2011 at 12:48
  • \$\begingroup\$ One factor with the EF 50mm f/1.4 that affects AF is that the motor for that lens has the fewest number of steps between MFD and ∞ of any lens in Canon's lineup. To get the most from that lens you will probably need to manually fine tune the focus after completing AF. \$\endgroup\$
    – Michael C
    Commented Aug 27, 2013 at 8:18

5 Answers 5


Moire Fringe Method

Use Bart van der Wolf's moire fringe method (also explained here and here, and archived here):

It works by exploiting the interference patterns or moiré between the R/G/B LCD elements and the camera's LCD elements when directly viewed with Life View [sic]. With good optics and perfect focus, the moiré is maximized.

Compared to focus charts


  • Much more precise.
  • Unaffected by tungsten / incandescent lighting, which causes front focus. (I'm not positive if extreme monitor color temperatures affect it.)
  • Easier to line up 100% perpendicular, yet less affected by it.
  • Doesn't require taking a picture: liveview is sufficient with magnification.


  • Without liveview, I'd imagine it'd be tedious.
  • Can't calibrate for tungsten lighting. (Though you can use a focus chart to supplement, and estimate the offset you'd need to give it for tungsten)

The Target Pattern

Load this file (or from this alternate location). It's a black-and-white image of concentric rings which get increasingly small and close as the they get further from the center circle.

There's nothing particularly magic about this image: anything which produces a moire pattern on an LCD screen should work, but this one is designed to give good results in many situations. Bart van der Wolf also produced an earlier moire target design which some people apparently find works better.


Setup and familiarization:

  1. Load the target pattern at 1:1 / 100% view in any image viewer — your web browser will do, but make sure it's showing the image unscaled.
  2. Set up your camera on a tripod perpendicular and at the appropriate distance away from the screen
    • Camera-to-subject distance should ideally be no less than 50 times the focal length of the lens. For a 50mm lens, that would be at least 2.5 meters (25m for a 500mm).
  3. Turn on liveview and magnify until the image is close to filling the screen.
  4. In manual focus mode, adjust the focus distance and become familiar with the maximum interference pattern

Method 1:

  1. Go to the point of maximum interference. You do this by focusing manually (contrast detect may not be as precise, but you can try).
  2. Switch to phase detect and push the AF button.
  3. If the focus changes, dial in microadjustment in the correct direction and repeat.

Method 2 (more accurate, in my opinion):

  1. Set focus to infinity or closest focus.
  2. Autofocus using phase detection. Some cameras let you do this while in liveview.
  3. In liveview, manually adjust focus to see if it was front or back focused.
  4. If so, adjust and repeat.


If you can't see a moire effect, see these tips, which are, in summary:

  • If the focus is too far off, it won't work.
  • You could be too close for the focal length.
  • You could be too far away for the focal length.
  • The lens has poor resolution.
  • The lens's manual focus control is too coarse to nail the spot.
  • 5
    \$\begingroup\$ I can confirm that the moire interference test works very well. I have used it with all my lenses to good effect. The chart method has the advantage that the degree of mis-focus can be shown to others but the moire interference test is more direct and precise. \$\endgroup\$
    – labnut
    Commented Mar 21, 2011 at 6:20
  • \$\begingroup\$ +1 For the superb answer, and if I could, I'd drop on another +1 for the "Life View" typo...classic, that one. ;) \$\endgroup\$
    – jrista
    Commented Mar 24, 2011 at 1:17
  • \$\begingroup\$ @jrista — typo is from the original. :) \$\endgroup\$
    – mattdm
    Commented Mar 24, 2011 at 4:38
  • \$\begingroup\$ Wish I could up-vote you again for providing good references. Backing references are so important. \$\endgroup\$
    – labnut
    Commented Mar 24, 2011 at 7:08
  • 2
    \$\begingroup\$ I found the earlier test target to work best, as there's a smaller focus window where moiré shows up at all. I used "method 1" above. On my Pentax K-7, switching between contrast and phase detect is too many menu steps, and manual focus works fine, so "method 2" was a bit tedious. Once you have the lens focused manually, press the AF button and watch the way the top of the lens turns; move the adjustment slider the same way in the custom menu. \$\endgroup\$
    – mattdm
    Commented Jun 7, 2011 at 16:34

To check if your camera/lens is having front-focus or back-focus issues you can download a pdf (incl a focus chart) here:


The first few pages describe how AF works and how it can be tested. The actual instructions for testing the AF start at page at page 13.

  • \$\begingroup\$ can you elaborate on "the interesting stuff"? \$\endgroup\$
    – mattdm
    Commented Mar 23, 2011 at 3:08
  • \$\begingroup\$ @mattdm I realize now that is very vague indeed, I'll edit the answer. I won't post the exact content from the pdf though since I'd need permission from the author for that. \$\endgroup\$
    – Marc
    Commented Apr 13, 2011 at 19:22

Contrast-Detect-vs.-Phase-Detect Adjustment Method

I've been a huge fan of the moiré fringe method suggested by @Eruditass. But in playing with it, I discovered that there's an even better way, if your camera supports contrast-detect autofocus in live view mode. This is, in some ways, a combination of "method 1" and "method 2" of the moiré fringe approach, but doesn't require a special target.

As I was playing with adjusting a lens, I realized that the contrast detection focus method always gets it right, presuming a decent focus target. The moiré chart makes this very clear, but any strong focus target will work. This is because the contrast-detect focus works based on the actual data recorded by the same sensor that records the image, whereas the phase-detect method requires a separate sensor. So, contrast-detect is slow and annoying, but spot-on. (It appears to be more precise than I can focus manually with the stock viewfinder screen.)

You can exploit the fact that your camera has this second, always-accurate focus method and correct for the differences.

On my Pentax K-7, the exact steps are as follows. The dedicated live view button makes this nice and quick; if it's harder to switch, this method might not be so convenient.

  1. Set the camera to use contrast detection for focusing in live view mode, and set it to use center-focus only.
  2. Fix your camera on a tripod, a natural distance from a strong, unambiguous, and flat focus target. I used this one I found via a quick Google Images search, but anything will do.
  3. Press the Live View button and then hold the AF button to focus using contrast detection. If your camera doesn't have a dedicated AF button, half-pressing the shutter will do.
  4. Press LV again to exit live view. Without moving anything, now press the AF button again to focus using normal phase-detect AF. You can look through the viewfinder to make sure it's doing the right thing, but once you're confident, you actually need to look at the lens itself as you push the button.
  5. Watch the direction the lens moves. Press the menu button, and then navigate to the AF adjustment menu option. (On my K-7, left, down 2×, right 3×.)
  6. Move the AF adjustment to match the way the lens went. On my Pentax camera, this means moving the slider in the same direction the top of the lens moved — if it turned to the left, the slider needs to go towards the negative side. This may differ on other systems, but you can do some quick experiments with extreme settings to figure it out.
  7. Save the setting, and then press LV again to exit the menu, and repeat from step 3.

You'll probably find that there's a range of settings where the AF doesn't move; I use the above process to find the edges of that range, and set the adjustment in the middle.

I quickly found in doing this that the right number varies pretty significantly based on focus distance. That means two things: 1) contrary to the typical AF adjust advice, rather than choosing a magical distance based on focal length, you should adjust for the distance you typically use that lens with, and 2) compromise is inevitable, so, pick something that works for the common case and don't stress so much about focus accuracy and sharpness. If you have something critical that is outside of your normal adjustment, you might want to align specifically for that shoot.

And again, another huge advantage of this approach is that you don't need a special target. As long as you can be sure that both focus methods are locking on to the same thing, any subject will do.

Focus is also sensitive to the frequency of light (the color temperature, basically), and unless you are normally lighting things with your computer monitor, that might sway the results. This lets you use natural lighting — or tungsten incandescent, if that's what you normally shoot under.

Although I came to this independently, I've since discovered that this exact method is the approach Canon recommends for accurate focus adjustment. And, the Nikon D500 actually has a built-in feature to do this automatically — cool, and I hope other DSLR makers follow suit.


Testing autofocus is hard to get right, so it's a good question.

I have used this chart with success: http://pentaxdslrs.blogspot.com/2008/06/part-1-autofocus-adjustment-for-pentax.html

(It's a Pentax blog, but the chart and directions are general except for the interactions with the actual camera.)

Follow the directions - they're very fiddly, but important.

Note that near focus and far focus can have difference calibration needs -- making a small chart like the one I suggest problematic -- but I have no idea if this is actually a problem in practice.

  • \$\begingroup\$ Comparing to the chart Marc suggests, I'd give the chart itself that I suggested the advantage for two reasons: (a) "Focus here" band has slight depth (camera could focus on the top or bottom of band). (b) Chart requires you to measure your own 45 degrees. On the other hand, his doesn't require mucking around with scissors and tape to cut it out. I have no comment on the instructions & other info in Marc's PDF - they look interesting, but TLDR. :) \$\endgroup\$
    – Reid
    Commented Jul 15, 2010 at 20:03
  • \$\begingroup\$ Priedhorsky: Your suggestion looks very good as well. I think they are both technically sound, it's just a matter of taste. I personally don't like scissors ;). \$\endgroup\$
    – Marc
    Commented Jul 18, 2010 at 18:13
  • \$\begingroup\$ can you describe the process a bit here directly, so that we have an answer rather than a reference to a (presumably fragile) blog post? Thanks! \$\endgroup\$
    – mattdm
    Commented Mar 23, 2011 at 3:09

I'm lazy, so for me, "best" means easiest. YMMV. :) I use Magic Lantern, with the dot_tune.mo module to perform auto dot tune.

Dot tune was developed by horshak on dpreview. You don't have to take any pictures with it, it's fast, free, and uses the data of when the AF confirmation dot lights or (or doesn't), with a lens set to critical focus manually, while running through all the AFMA settings to see which ones give you AF confirmation. The ML module simply automates the process.

This works because of how the AFMA setting is used internally in the camera as input. As horshak explains it:

... Nikon DSLRs have an electronic rangefinder in the viewfinder that shows you when:

  • Subject is in focus (green dot)
  • Focus is behind subject - green arrow pointing left, indicating focus ring should be turned to the left, away from infinity
  • Focus is in front of subject - green arrow pointing right, indicating focus ring should be turned to the right, toward infinity

The rangefinder's determination of the above conditions is based on the phase-detect AF system's evaluation of focus. This system includes a configurable AF fine tune value which can be adjusted on a per-lens basis or globally for all lenses that don't have a per-lens value configured. Most would assume that this AF tune value is an "output" bias that the camera adds to all lens movement commands, so that instead of telling the lens "focus to X" it instead tells the lens "focus to X + tune value". In actuality the AF tune value is an "input" bias that feeds into the PDAF's sensing logic, altering when the camera believes it has acquired focus. You can read more about this here.

Since AF tune affects the camera's PDAF evaluation of what's in focus, it also affects the electronic rangefinder indication of focus. You can demonstrate this by establishing critical focus on a subject (green dot), changing the AF tune value, then without refocusing, observe that the rangefinder now shows a left or right arrow indicating the camera thinks the subject is no longer in focus, even though you didn't adjust focus.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.