It's tough to work out where to focus sometimes...
The amount of the picture that's in focus (depth of field) depends on three things.
1. Your Aperture
2. Your focal length
3. Whereabouts you are focussing
DofMaster can calculate this, but whilst you are unlikely to have a PC whilst you are out and about, you can either get an app for your smartphone, or just remember some simple rules.
1. The higher the aperture number (which actually means the smaller the aperture physically is) the more depth of field you have.
2. The wider your focal length is (the lower the number) the more depth of field you have.
3. The further away you focus, the less depth of field you have.
For example, at f11 & 18mm focal length I can focus at an object that's 5 metres away and everything from 1.16m to infinity will be sharp and in focus (huge depth of field).
That same subject at f11 &
55mm focal length will only have a depth of field from 3.7m to 7.7m. Everything closer or further away will be blurred. The more you zoom in, the less margin of error you have so you have to be sure to get that focus point close to your subject.
Hope this isn't too confusing!
Ian.