Depends on the beer and how good your process is. When bottling homebrew the shelf life of hop-forward beers will be relatively poor. To really keep hoppy beer fresh for a while even simply kegging often isn't good enough- one needs to get into pressurized closed transfers.
Apart from that, I've got bottles of homebrew (sours and wild beers) pushing on 8 years old that are still wonderful. The older non-sour strong beers (a Barleywine and a Belgian Quad notably, others I didn't keep as long and drank faster) made it a about 5 years in the bottle before going downhill.
Your average non-strong ale, I would say 6-9 months is probably max shelf life, give or take depending on storage conditions (cool/cold and stable will last far longer than warm/hot and fluctuating).
Additionally, if your bottling process isn't sound, you'll get far less shelf life.