Astrophotography Focus & Depth of Field

Stars are at infinity โ€” so astro DoF is less about "how much is sharp" and more about two numbers: nailing infinity focus, and how long you can expose before stars trail.

Focusing at infinity, properly

The lens infinity mark is a lie โ€” most lenses overshoot infinity (they're built to focus slightly past it for thermal drift), so trusting the mark gives you slightly soft stars. Do this instead:

  1. Manual focus + live view at 10ร— on the brightest star you can find.
  2. Turn the focus ring until the star is the smallest, tightest point โ€” not a disk with a halo.
  3. Focus-peaking (red highlight) makes this easy on mirrorless; tape the ring afterward if it drifts.
  4. For lenses with no stars visible (city glow), focus on the moon, a distant light, or use the lens's hard infinity stop then back off 1โ€“2 mm of ring travel.

A subtle point: a wide-angle at f/2.8 focused at 25 m instead of infinity still looks sharp because the hyperfocal distance is ~7 m โ€” but a 135 mm lens at f/2 focused 1 m off infinity is visibly soft. Check your hyperfocal to know how much forgiveness you have.

The f-ratio trade-off (Milky Way)

Astro landscapes run the classic DoF trade-off against light collection:

ApertureDoF at 24 mm, 5 m focus (FF)Astro verdict
f/1.4~4.0 mMaximum light, foreground risk โ€” focus-stack foreground + sky
f/2~6.6 mThe classic Milky Way choice
f/2.8~13.5 mForgiving, still fast; hyperfocal โ‰ˆ 7 m
f/4~620 m (โ‰ˆ โˆž)Half the light of f/2 โ€” needs ISO or stacking

The pro workflow: shoot the sky at f/1.8โ€“f/2.8 focused at infinity, then shoot a foreground frame focused at 3โ€“5 m and blend โ€” you get maximum star light and a sharp foreground. That's DoF math applied to astro.

How long before stars trail?

Stars move ~15ยฐ/hour. The maximum exposure before visible trails depends on your lens and sensor:

Example: 24 mm on a full-frame 45 MP camera (4.4 ยตm pixels) at f/2.8 โ†’ NPF โ‰ˆ (35ร—2.8 + 30ร—4.4) รท 24 = 9.6 s, vs the 500 rule's optimistic 20.8 s. Get your exact numbers in the star trails calculator.

Related tools & guides

Star Trails Calculator

500/400/300 + NPF max exposures for your camera.

Open โ†’

Pixel Scale Calculator

Is your sampling matched to your optics and skies?

Open โ†’

Exposure Equivalence

Balance ISO vs shutter to hit the exposure.

Open โ†’

Astro focus FAQ

Should I use autofocus at night?

AF usually fails on stars (too little contrast). Focus manually with live-view magnification; some newer cameras have a "star AF" mode that works โ€” worth testing, but manual is the reliable default.

Why do my stars look like donuts?

That's usually focus slightly off (the classic halo) or coma in the lens corners. Fix focus first; if corners still show it, stop down one stop and re-check.

Do I need a star tracker?

Not for wide-field Milky Way (the 500/NPF times are enough). For deep-sky through a telescope โ€” yes, tracking is required, and then the exposure-time question becomes about noise, not trails.