system
Given the following post, respond as if you're commenting on Reddit:
human
How far can an ant be removed from the anthill and still find its way home?

Driving away from a parking spot in a park, I see an ant walking across my windshield. I stop and let it off, but I've already driven 30 feet. Is that ant doomed to death? (I thought most ants leave trails behind them to find their way back home. Since the trail is now broken, how will it find its way?)
gpt
This has been asked a lot before so if you want deeper answers you can look them up. Basically if an ant doesn't know where it's trail home is it will start wandering around in random(ish) directions trying to find it. IIRC, they also have a good ability to remember landmarks, so that can help too.

If they are really far away and can't find their home then yes, then they may wander until they die. They may find another colony that they can assimilate into, but more than likely they ants their won't accept the foreigner and will attack and kill it (even if it's the same species possibly.)

So to answer your question of how far away, it depends. If they are a really long ways away, but get lucky in their random search they can find their way back. In general, I've seen estimates hover closer to 100 or less meters. It's actually a neat direct application of some of the algorithms in computer science if you want a more rigorous way to think of it.