Why badge data is the fastest way to see how full your office really is
Since hybrid work became normal, most companies pay for an office sized for a world where everyone came in five days a week. Facilities managers, finance teams and HR business partners are now asked the same blunt question by leadership: how full is the building, really? Desk-booking tools give part of the answer, opinion surveys give a biased answer, and walking the floors on a Tuesday gives an anecdote. The data source that almost every organisation already owns is the access-control system. Every time someone taps a badge at the turnstile, the system writes a line with a badge ID and a timestamp.
This free first lesson shows you how to turn two weeks of that raw log into four numbers that drive every space decision: the daily attendance rate, the average day, the peak day and the peak-to-average ratio. You will work with Larkfield Analytics, a fictional data company with 400 employees assigned to its Quayside Tower office (4 floors, 360 desks). All figures are illustrative, but the method is exactly the one you would use on a real export from your security team. If you work in workplace strategy, real estate, facilities, FP&A or people analytics, this is the foundation for every later calculation: desk sharing ratios, space per person, cost per attended day and the business case for giving back a floor.
The core idea: count people, not swipes
The first trap in badge data is that a swipe is not a person. One employee swipes in at 8:40, out for lunch at 12:15, back in at 12:50, out for a client meeting and back again in the afternoon. That is five swipes for one person on one day. If you simply count rows in the log, you overstate attendance by a factor of two to three. In the Larkfield data, the first week has 3,076 swipes but only 1,178 person-days, so the raw count is about 2.6 times too high.
The fix is to count unique badges per day: the number of different badge IDs that appear at least once on that date. Each person counts once, no matter how often they came and went. Most access-control systems can export this directly, and if yours cannot, Excel can do it with UNIQUE and COUNTIFS (shown below). Once you have unique badges per day, the attendance rate is simple:
Attendance % = unique badges ÷ headcount assigned to the office. It is the share of the workforce that actually turned up. On Monday 5 October, 205 of 400 people came in, so attendance was 205 ÷ 400 = 51.25%.
Why does the peak matter more than the average? Because space is a capacity problem. A building is not full on average; it is full on the busiest day. If Wednesday brings 296 people and you only have 280 desks, people cannot work, regardless of how quiet Friday is. That is why the lab asks you for both the average and the peak, and then for the ratio between them. A peak-to-average ratio of 1.0 would mean every day is equally busy. The higher the ratio, the more uneven the week, and the more you pay for space that sits empty on quiet days.
Worked example: two weeks at Quayside Tower
Here is the same data as in the lab above, with the attendance rate already calculated. The date is in column A, the weekday in B, raw swipes in C, unique badges in D and the headcount of 400 in cell D15. The formula in column E divides the unique badges by the headcount, with an absolute reference to D15 so it can be copied down.
| Date | Day | Badge swipes | Unique badges | Attendance % | Formula in E |
|---|---|---|---|---|---|
| 5 Oct 2026 | Mon | 531 | 205 | 51.25% | =D4/$D$15 |
| 6 Oct 2026 | Tue | 752 | 284 | 71.00% | =D5/$D$15 |
| 7 Oct 2026 | Wed | 781 | 296 | 74.00% | =D6/$D$15 |
| 8 Oct 2026 | Thu | 690 | 262 | 65.50% | =D7/$D$15 |
| 9 Oct 2026 | Fri | 322 | 131 | 32.75% | =D8/$D$15 |
| 12 Oct 2026 | Mon | 509 | 198 | 49.50% | =D9/$D$15 |
| 13 Oct 2026 | Tue | 795 | 291 | 72.75% | =D10/$D$15 |
| 14 Oct 2026 | Wed | 749 | 288 | 72.00% | =D11/$D$15 |
| 15 Oct 2026 | Thu | 707 | 270 | 67.50% | =D12/$D$15 |
| 16 Oct 2026 | Fri | 301 | 124 | 31.00% | =D13/$D$15 |
Now the four summary numbers. The averages and peaks are always calculated on the unique badges in D4:D13, never on swipes:
| Measure | Excel formula | Result |
|---|---|---|
| Average daily attendance (people) | =AVERAGE(D4:D13) | 234.9 |
| Peak attendance (people) | =MAX(D4:D13) | 296 |
| Peak day (date) | =INDEX(A4:A13,MATCH(MAX(D4:D13),D4:D13,0)) | Wed 7 Oct 2026 |
| Peak-to-average ratio | =MAX(D4:D13)/AVERAGE(D4:D13) | 1.26 |
| Average attendance % | =AVERAGE(E4:E13) | 58.7% |
| Desks used on the peak day | =MAX(D4:D13)/360 | 82.2% |
Read the results like a workplace analyst would. On an average day 234.9 people come in, which is 58.7% of the 400 assigned staff and only about 65% of the 360 desks. But on the peak day, Wednesday 7 October, 296 people were in the building, 82% of the desks. The ratio of 1.26 says the busiest day is 26% busier than the average day. Fridays (131 and 124 people) are less than half as busy as Wednesdays. That pattern, a strong Tuesday to Thursday and a weak Monday and Friday, is very common in hybrid offices, and it is the main reason why simply dividing desks by average attendance gives the wrong answer.
How the INDEX/MATCH peak-day formula works
The formula =INDEX(A4:A13,MATCH(MAX(D4:D13),D4:D13,0)) reads from the inside out. MAX(D4:D13) returns the highest attendance, 296. MATCH(296,D4:D13,0) finds the position of 296 in the list, which is 3 (the third row). The final 0 means exact match, which you always want here. INDEX(A4:A13,3) then returns the third date in column A, 7 October 2026. Format the cell as a date (Ctrl+1, Number, Date) or Excel shows the serial number 46302. If two days tie for the peak, MATCH returns the first one. In Excel 365 you can also write =XLOOKUP(MAX(D4:D13),D4:D13,A4:A13), which does the same in one function.
Step by step: how to do it in Excel
- Get the raw export from your access-control or security team: one row per swipe with at least the badge ID and the timestamp. Ask for a full number of weeks, ideally four to eight, so that holidays and one-off events do not distort the picture.
- If you only have timestamps, add a date column with
=INT(B2)(or=DATE(YEAR(B2),MONTH(B2),DAY(B2))) so every swipe on the same day has the same date value. Format it via Home > Number Format > Short Date. - Build the list of dates: in Excel 365 type
=UNIQUE(C2:C5000); in older versions copy the date column and use Data > Remove Duplicates. - Count unique badges per day. In Excel 365:
=ROWS(UNIQUE(FILTER(A$2:A$5000,C$2:C$5000=F2))), where column A holds the badge IDs and F2 the date. Alternatively, insert a PivotTable (Insert > PivotTable), tick Add this data to the Data Model, put the date in Rows and the badge ID in Values, then set Value Field Settings to Distinct Count. - Put the headcount assigned to the office in its own cell (D15 in the lab) and calculate the attendance rate with
=D4/$D$15. Press F4 after clicking D15 to add the dollar signs, then double-click the fill handle to copy down. - Format column E as a percentage with Ctrl+Shift+5, then add one decimal with Home > Increase Decimal.
- Add the summary block:
=AVERAGE(D4:D13),=MAX(D4:D13), the INDEX/MATCH formula for the peak day and the ratio=MAX(D4:D13)/AVERAGE(D4:D13). - Chart it: select the dates and unique badges, choose Insert > Column Chart, then add the desk count as a second series and change it to a line (right-click > Change Series Chart Type). That one chart usually ends the debate about whether the office is too big or too small.
Which headcount should you divide by?
The denominator decides what your percentage means, so state it clearly in every report. The usual choice, and the one in the lab, is the headcount assigned to the office: everyone whose home base is Quayside Tower, whether they come in or not. Some organisations subtract people on long-term leave or fully remote contracts to get an eligible headcount. Others report attendance against desks instead of people (296 ÷ 360 = 82% on the peak day), which answers a different question: how full is the furniture, not how many staff turned up. Both are useful. Just do not mix them in the same chart, and write the denominator in the axis title.
Also think about who badges in but is not on the headcount: contractors, visitors with temporary cards, cleaners and security staff. If their badges are in the export, either filter them out by badge type or add them to the denominator. Otherwise you can end up with attendance above 100% on busy days, which is a sure sign the two numbers do not describe the same population.

Common mistakes and how to spot them
- Dividing swipes by headcount. If your attendance rate looks like 130% or 190%, you counted swipes. Check that column D holds unique people, not rows from the log.
- Relative reference to the headcount. If E5 suddenly shows #DIV/0! or a huge number after you copy the formula down, the reference moved from D15 to D16. Use
$D$15. - Averaging percentages from groups of different sizes. Within one office with a fixed headcount it is fine, but across sites with 400 and 60 staff, compute total people ÷ total headcount instead of averaging two percentages.
- Including weekends and public holidays. A Saturday with 6 people or a bank holiday with zero drags the average down and makes the ratio look extreme. Restrict the range to normal working days, or filter with
AVERAGEIFS. - Planning for the average. If someone proposes sizing the office for 235 people, show them the Wednesday bar. Plan for the peak plus a buffer, which is exactly what the desk-sharing lesson of this course covers.
- Showing the peak day as a number. If D18 shows 46302, the formula is correct but the cell is formatted as General. Format it as a date.
- Too short a period. Two weeks are enough to learn the method, but a single event (an all-hands meeting, a strike, school holidays) can create a false peak. Use at least a month for real decisions and look at the second and third highest days too, for example with
=LARGE(D4:D13,2).
Quick reference: functions and shortcuts used
Keep this table next to the lab. Everything in this lesson needs only a handful of functions, and all of them work in Excel 2016 and later except where marked 365.
| Function / shortcut | What it does here | Example |
|---|---|---|
AVERAGE | Mean daily attendance | =AVERAGE(D4:D13) |
MAX / LARGE | Peak day, second-highest day | =LARGE(D4:D13,2) |
INDEX + MATCH | Date of the peak day | =INDEX(A4:A13,MATCH(MAX(D4:D13),D4:D13,0)) |
XLOOKUP (365) | Same lookup in one function | =XLOOKUP(MAX(D4:D13),D4:D13,A4:A13) |
UNIQUE, FILTER, ROWS | Unique badges per day from a raw log | =ROWS(UNIQUE(FILTER(A:A,C:C=F2))) |
AVERAGEIFS | Average for one weekday only | =AVERAGEIFS(D4:D13,B4:B13,"Wed") |
| F4 | Toggle absolute reference ($D$15) | Click D15 in the formula, press F4 |
| Ctrl+Shift+5 | Percentage format | Select E4:E13 |
| Ctrl+1 | Format Cells dialog (date format) | Select D18 |
Real-world uses
- Lease renewal. A company with a lease break in 18 months uses three months of badge data to show that the peak never exceeds 300 people, which supports negotiating fewer floors instead of renewing all four.
- Return-to-office policy. HR introduces an "anchor day" on Wednesdays. The weekday pattern from badge data shows whether it worked and whether Wednesday is now over capacity.
- Cleaning and catering contracts. If Fridays bring a third of the Wednesday crowd, the canteen and cleaning schedules can be adjusted by day instead of being sized for a full house.
- Multi-site comparison. A group with offices in several cities computes attendance % and peak-to-average ratio per site to decide where to consolidate first.
- Energy savings. Facilities closes one floor on low days and switches off its heating, lighting and ventilation, based on the days when attendance is reliably below the capacity of the other floors.
What you will build in the rest of this course
This first lesson is free. The lessons below are part of the paid course (USD 9.90 one-time) and continue with the same company, Larkfield Analytics, so every number builds on what you calculated here.
Desk Utilisation: Booked vs Used, No-Shows and Walk-ins. Bookings and reality rarely match. You compare desk bookings with actual use, calculate desk-days available, the no-show rate and utilisation per team, and see which teams reserve desks they never sit at.
Desk-Sharing Ratio: How Many Desks Do You Need at the Target Peak? Here the peak from this lesson becomes a desk number. You size the estate from each department's peak attendance plus a buffer, compute the sharing ratio and find out how many desks Larkfield can spare.
Space per Person and per Desk: Square Metres, Density and the Benchmark Gap. You measure square metres per desk and per employee floor by floor and calculate how much area lies above the company's density target, the number a real estate team needs for a relocation brief.
Occupancy Cost per Desk, per Employee and per Attended Day. You build the annual occupancy cost from rent, service charge, utilities and cleaning and express it per desk, per employee and per day someone actually comes in, often the most eye-opening number for a CFO.
Meeting Room Utilisation: Hours Booked vs Used and the Size Mismatch. You compare bookings with sensor data for eight rooms, compute the seat fill and highlight oversized rooms where two people sit in a twelve-seat boardroom.
Consolidation Scenario: Release a Floor, Check Capacity, Savings and Payback. The decision lesson: can Larkfield give back Floor 6? You check the remaining desks against the new peak, calculate the annual saving, the payback in months and the net saving over five years.
The Weekday Pattern: Average Attendance by Day and the Chart for the Leadership Team. You average six weeks of attendance by weekday, find the busiest day and the peak-to-trough gap, and build the one chart that leadership will actually remember.
Summary
Badge data is the cheapest and most objective view of how a hybrid office is used. Count unique people per day, not swipes, divide by the headcount assigned to the office, and summarise with the average, the peak, the peak day and the peak-to-average ratio. In the Larkfield example, an average of 234.9 people hides a Wednesday peak of 296, a ratio of 1.26, which is why space must be planned for the peak. Now scroll up to the lab, enter the four formulas yourself and let the Coach check them. It takes about 14 minutes, and you will have a template you can reuse on your own badge export tomorrow.
Frequently asked questions
How do you calculate office attendance rate from badge data?
Count the unique badge IDs per day, not the number of swipes, and divide by the headcount assigned to the office. In Excel that is =D4/$D$15 when D4 holds the unique badges and D15 the headcount.
Why are badge swipes higher than actual attendance?
People swipe several times a day when they go out for lunch, meetings or breaks. Counting rows in the log therefore overstates attendance, often by two to three times, so you need unique badges per day.
How do I count unique badges per day in Excel?
In Excel 365 use =ROWS(UNIQUE(FILTER(badges,dates=F2))). In older versions use a PivotTable added to the Data Model with the badge ID set to Distinct Count.
What is the peak-to-average ratio for office occupancy?
It is the busiest day divided by the average day, =MAX(range)/AVERAGE(range). A value of 1.0 means a flat week; higher values mean more space sits empty on quiet days.
Should office space be planned for average or peak attendance?
For the peak, usually with a small buffer, because the building is full on its busiest day. The average tells you how much space is wasted the rest of the week.
How do I find the date of the busiest day in Excel?
Use =INDEX(dates,MATCH(MAX(values),values,0)) or, in Excel 365, =XLOOKUP(MAX(values),values,dates). Format the result cell as a date.
Keep going: Office Space & Hybrid Work: Desk Utilisation, Space per Person & Cost
This free lab is lesson 1 of 20. Unlock the other 19 hands-on labs, the final exam and your certificate for a one-time CHF 9.90.
- Desk Utilisation: Booked vs Used, No-Shows and Walk-ins
- Desk-Sharing Ratio: How Many Desks Do You Need at the Target Peak?
- Space per Person and per Desk: Square Metres, Density and the Benchmark Gap
- Occupancy Cost per Desk, per Employee and per Attended Day
- Meeting Room Utilisation: Hours Booked vs Used and the Size Mismatch
- Consolidation Scenario: Release a Floor, Check Capacity, Savings and Payback
- The Weekday Pattern: Average Attendance by Day and the Chart for the Leadership Team
- Occupancy by Hour: Sensor Counts, the Peak Hour and the Concurrency Factor
- Anchor Days by Team: Daily Desk Demand, Shortfall Days and the Capacity Check
- Auto-Release of Unconfirmed Bookings: Ghost Desks, Turn-Aways and Recovered Capacity
- Planning to the 90th Percentile: Design Day, Overflow Days and Desks Saved
- Five Offices Side by Side: Portfolio Utilisation, Cost per Attended Day and Space per Peak Person
- Twelve Months of Attendance: Monthly Averages, a 3-Month Moving Average and the Trend Chart
- Headcount Growth: Projecting Peak Attendance and the Year the Desks Run Out
- Right-Sizing the Meeting-Room Mix: Demand by Group Size, Rooms Needed and the Gap
- Space Mix: Desk Area vs Collaboration Space, the Target Mix and the Square Metres to Convert
- Stay, Shrink or Move: Five-Year Occupancy Cost with Rent Escalation
- Before You Report: Plausibility Checks Across Badge, Booking and Sensor Data
- Final Project: The Quarterly Workplace Dashboard with KPIs, Changes and Chart