I've been asked to analyse entry/exit data for an office to find out the minimum number of people present in the building for fire safety reasons. The building operates 24/7 so there should always be more than one person present.

I can say how many people have entered, and how many people have exited, but the data is anonymous so I can't say who has entered or exited.

I am using the formula below to work out how many people are in the building:

Present(n) = Present(n-1) + Enter(n) - Exit(n)

I think this can pick up trends - when people tend to enter and exit, and when it is likely there are few people around, but it cannot tell me how many people are in the building because I don't have Present(n=0), and as far as I'm aware this is not something we have.

I am sure there is a way to do this, but I have hit a dead end and would really appreciate some advice.

  • 1
    $\begingroup$ so what you are looking for is advice on how to get a useful and reliable estimate of the initial conditions at the start of recording? Is it an option to have a head count carried out at a specified time (while you count exits and entries)? What are the requirements for accuracy? Do you need to get the exact headcount so fire fighters know exactly what how many people may need rescued? Or do you want an estimate within a few percent of the true value? $\endgroup$
    – ReneBt
    Jul 23, 2018 at 8:33
  • $\begingroup$ @ReneBt Yes that's correct. The data is from building entry/exit using a smart card. There isn't scope to do any more surveying, other people on the project think I can figure it out using the entry/exit data. $\endgroup$
    – scc268
    Jul 23, 2018 at 12:14
  • 1
    $\begingroup$ Is the building ever emptied, such as when fire alarms go off? Buildings I've worked in typically have several fire drills each year and have fire alarms go off for a variety of unplanned reasons (almost never actually to do with fire) typically once or twice a year, and we can't re-enter until it has been cleared by the fire brigade. That would give a time at which you know n=0 (or very nearly) for at least a short period (between the last fire-warden's exit and the first firefighter entering). You'd only need one on record. $\endgroup$
    – Glen_b
    Jul 24, 2018 at 10:11
  • $\begingroup$ i think it is not possibe as you need an id. try to find an id and it should be possible. $\endgroup$
    – user343027
    Dec 10, 2021 at 9:50

1 Answer 1


One approximate way would be to count wireless devices present. In my place of work I can easily have an approximate idea of the number of people around scanning the network and finding how many wireless phones are connected. You can easily tell phones from other devices such as laptops looking at the manufacturer of the device (which is reported by the scanning program). Telling apart phones and tablets is more difficult (and a single individual may have one of each connected).

This of course assumes a corporate network and that all people carry wireless phones (true at my location) and connect to the network (true to a good approximation at my location).

  • $\begingroup$ That's a good idea but I don't think that's possible - it would require more resources than I have available. Furthermore, my colleagues reckon I can figure it out using the data I have, but I'm not yet convinced. $\endgroup$
    – scc268
    Jul 23, 2018 at 12:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.