Location technology

    What Is Geofencing and How Does It Work?

    A geofence is a virtual boundary around a real place that triggers actions when a device enters or leaves. Learn how it works and where it is used.

    Updated 14 October 2026 · 3 min read

    A geofence is a virtual boundary drawn around a real-world area. A system watches the location of a device and reacts when it crosses that boundary, either by entering or by leaving. The reaction can be a notification, an entry in a log, a change of settings or a message to another system.

    How it works

    1. Define the area. This can be a circle (a centre point and a radius), a polygon that follows a boundary, or a rectangle such as a bounding box.
    2. Track the device. The device's position comes from satellite positioning, Wi-Fi or cell data; see how GPS works and how phones use Wi-Fi and cell towers.
    3. Test the position. For each update, the system checks whether the point is inside or outside the area.
    4. Trigger an event. When the result changes from outside to inside (enter) or inside to outside (exit), or after a time spent inside (dwell), it fires an action.

    Common uses

    • Delivery and logistics: marking a vehicle as arrived at a depot or customer area.
    • Retail: a store offer when a customer is nearby, with their consent.
    • Security and safety: alerts if equipment leaves a site or a child's device leaves a school area.
    • Workforce: recording arrival at and departure from a work site.
    • Service areas: limiting an offer or an order to people inside a delivery zone.

    Accuracy limits

    Geofences are only as reliable as the location data feeding them. A phone reading with an error of 20 m near a boundary can seem to jump in and out of the fence. Several practices help:

    • Make fences larger than the expected error, rather than tracing a building tightly.
    • Require the device to stay inside for a short time before confirming entry.
    • Use the accuracy value reported with each reading, and ignore weak ones.

    The causes of these errors are described in why phone GPS is inaccurate.

    Battery and permissions

    Continuous tracking uses power. Mobile operating systems offer efficient region-monitoring features that wake an app only when a boundary is crossed, and they require explicit permission, sometimes including background location access. Users can usually choose approximate or precise location.

    Privacy

    Because geofencing implies that someone's movements are being observed, it should be used openly, for a clear purpose and with consent. Read location privacy and consent for the principles.

    Where location codes fit

    A geofence is about areas and events, while a location code names a fixed cell. A business might use exact-location codes for delivery points and a geofence for its service area, with the two serving different jobs.

    Frequently asked questions

    Does geofencing need GPS?

    Not always. It can use GPS, Wi-Fi or cell data, depending on the accuracy needed and what the device allows.

    Can geofencing work without the user knowing?

    Apps normally need the user's permission to access location, and good practice is to explain clearly why it is used.