The science

illustrative example Pigfox Cantina — a fictional venue

Why a room has a revenue-optimal headcount, what dR/dN is, and how we find yours without guessing.

New to this? Start here →

Revenue is a curve, not a line

Every venue is run as though revenue were a line: more people through the door, more money over the bar, up to whatever the fire marshal wrote on the certificate. It is not a line. It rises, it turns over, and past the turn every extra body earns you less than the one before — and then less than nothing. The posted capacity is a SAFETY number. It was never a revenue number, and nobody ever claimed it was.

The certificate says how many people the room can hold without anybody getting hurt. It has nothing to say about how many it can hold while still serving them, and those are not the same number.

The mechanism: a crowd slows itself down

The one piece of physics in any of this is a relation between how tightly packed a crowd is and how fast the people in it can walk. It is called the fundamental diagram, and the simplest form of it — Greenshields' — is a straight line: at zero density everybody walks at their own pace, at jam density nobody moves at all, and in between it falls off in proportion.

v(ρ) = vmax (1 − ρ/ρjam)

In plain terms: an empty room, you walk. A full one, you shuffle. A packed one, you stand there. Everybody already knows this — the useful part is that it is close enough to a straight line to do arithmetic with.

Walking pace against the crowd you are walking through, with the crowd the average patron actually stands in at both ends of the slider.
Free walking pace
4.4 ft/s
Jam density
0.30 /sq ft
At N* = 98
0.059 /sq ft · 3.53 ft/s
At 180
0.241 /sq ft · 0.87 ft/s

People are not an ideal fluid. Bernoulli's equation does not govern your patrons — it describes an inviscid, incompressible flow along a streamline, and a crowd is none of those things: they have somewhere to be, they queue, they stop to talk. The speed-density relation survives the analogy because it is the one part pedestrian research actually goes out and measures. This is the idea that motivates the model. It is not the model.

Why a maximum has to exist

Borrow one more piece of bookkeeping and the shape falls out on its own. Flow — people past a point per minute — is density times speed. Density rises with headcount and speed falls with it, so their product starts at nothing in an empty room, ends at nothing in a jammed one, and is positive in between. Anything that starts at zero, ends at zero and is positive in the middle has a maximum somewhere in the middle. That is not a modelling choice; there is nowhere else for it to be.

q = ρ v(ρ) = ρ vmax (1 − ρ/ρjam)

And that is exactly where we stop borrowing.

The curve on this page is not that formula. A parabola from the fundamental diagram would tell you a peak exists and put it at half the jam headcount, which is an answer about crowds in a corridor rather than about drinkers at a bar. So we simulate the bar instead. Patrons walk to it, wait their turn in the crush at the rail, are served, carry the drink to a table, stay with it, and go back. The congestion law above governs their walking and nothing else — it never touches how fast anybody pours. Then the drinks are COUNTED, once the room has settled, at every headcount the slider reaches.

That peak was not put there. It is where two effects cross. Below it the bar idles: nobody is waiting, and the next patron through the door is worth money. Above it the rail is the problem — a served patron cannot push clear of the crowd and the next one cannot get on, so the service points stand blocked and the bar pours LESS with more people in the room.

N* (measured)
98
Revenue there
$705.00/hr
Posted capacity
120
Cost of packing to it
$52.13/hr · $313/night

illustrative example Pigfox Cantina — move the slider yourself.

The function we differentiate

The name takes a derivative, so here is the thing being differentiated. R is revenue per hour. N is the headcount in the room. s of N is the serve rate — drinks per minute with that many people in — and it is the one term that was measured rather than chosen. Multiply it by the minutes in an hour and by the average drink price, and that is R at that headcount.

R(N) = s(N) × 60 × p

R
revenue per hour, at a given headcount
N
how many people are in the room
s(N)
the measured serve rate: drinks per minute at that headcount
60
minutes in an hour, which is all that turns a rate per minute into a rate per hour
p
the average drink price, the one money constant in any of this ($9.00)

One: the function

Revenue per hour against headcount: measured, one point per headcount, with the marker on the best one the sweep found.

There is nothing to differentiate analytically, because R has no formula here. So the slope is a difference: the change in R from one whole-person headcount to the next. N* is where that difference crosses zero, which is the last headcount at which letting somebody in still pays.

dR/dN  ≈  ΔR/ΔN

Two: the same curve, read as a rate

The picture above is money per hour. This one is the same measurement asked a different question: what is the NEXT person worth, at each headcount? It runs high and almost level on the left — the room has room, and each arrival is worth about what the last one was. It sags as the room fills, crosses the line, and goes negative on the right, where the next person through the door takes money off you.

dR/dN against headcount. The dashed line is zero; the marker is at N*, the last headcount whose value is still above it. The scatter past the crossing is honest: a derivative is a difference between two measurements, differencing amplifies whatever noise they carried, and past the posted capacity this room is bistable to begin with.

This is where the lopsidedness stops being a claim and becomes something you can see: a long shallow plateau on the way up, and a short steep drop on the way down. The two sections below say why.

Three: where the rate crosses zero

dR/dN is the slope of that curve: the change in revenue per hour from one more person in the room. It is positive while the room is under-filled, crosses zero at the top, and goes negative past it. The crossing is the whole product — it is the last headcount at which letting somebody in still makes you money, and we call it N*.

dR/dN = 0  at  N* = 98

Where that rate crosses zero is the whole product. Below the crossing the next person still pays; above it they cost you. N* is the last headcount at which letting somebody in still makes money — so it sits just before the crossing rather than on it, which is what a best-of-a-list means when the list counts whole people.

That table is published. It is the measured file this whole curve is built from — one row per headcount, holding the count of drinks served per minute. Take a row, multiply by the two numbers above, and you have R there. What the site does NOT do is difference those raw rows against each other: they are bumpy, for the reasons set out further down this page, so a short straight line is fitted through a window around each headcount and the slope is read off that. Do it by hand on the raw rows instead and you will land a person or two either side of the marker.

The measured table, as it is read →

No expression is fitted to R. There is nothing on this page you could evaluate at a headcount to get revenue: the value at every headcount is a count of drinks the simulated bar actually poured. The local straight line is a way of READING that measurement without letting two noisy neighbours set the slope, and it is not a replacement for it. We differentiate the measurement.

Knowing N* is not an academic result. It is a door policy, a staffing plan and a rail layout. It tells you when to slow the door rather than when to shut it, whether another service point is worth more than another table, and what a queue at the rail is actually costing you on a Friday. The diagnostic does this against your own transactions rather than against a simulated venue: same arithmetic, your numbers.

Find your N

Why the two sides are not the same shape

Left of the peak the room is DEMAND-LIMITED: it is not busy enough to get in its own way. Every extra person through the door is another buyer, the bar has slack to serve them, and nobody is waiting on anybody. Revenue climbs close to a straight line, because in that stretch a headcount is very nearly just a count of customers.

Right of it the room is CONGESTION-LIMITED, and the limit is not the bar's speed — it is the floor. Queues lengthen, reaching the rail is harder, a served patron cannot push clear so the next cannot get on. Each extra body now slows the service of everyone already there by more than their own thirst adds, so the takings fall while the room keeps filling.

Two different forces, so two different shapes, and neither is the mirror of the other. That asymmetry is itself evidence: a curve that fell away exactly as it rose would be the signature of a formula evaluated about its own midpoint, not of a room that was measured. The lopsidedness is what a real bar leaves behind.

Why the curve is not smooth

Look at the revenue figure and it is visibly bumpy. That is not a rendering artefact and it is not a crude model — it is what a measurement looks like. Headcount is an integer: there is no such thing as 97.4 people in a room, so the curve is a ladder of separate experiments rather than a line through a function. Each rung is the average pour rate of a stochastic queueing process counted over a finite window, and a finite count of a random process carries scatter. Count for twice as long and the scatter halves; it never reaches zero, because nothing here is being evaluated.

There are also genuine kinks, and they are findings rather than noise. When the third service point stops idling, when the queue starts spilling back past the point where a served patron can still push out — the room changes regime at those headcounts, and the curve bends there. A parabola fitted through the whole range assumes those away by construction, which is exactly why this page stopped borrowing one.

It is also why the top of the curve is nearly flat, and why that is worth knowing rather than worth hiding. The best rung wins by a margin far finer than the scatter on any single one of them — which means N* is a measured fact about this room and not a landmark you could have guessed, and it means a door policy a few either side of it is losing almost nothing. What costs real money is being far from it, and that is what the curve is for.

Best rung
N* = 98
Nearest rung to it
99
It falls short by
0.106%

So the raw counts are what gets committed to the repository, bumps and all, and the only thing applied to them is a local straight-line fit at the moment they are read — narrow, in one place, and never twice. Smoothing the file itself was rejected: every surface on this site has to quote the engine, and a sanded curve on disk is a number nobody measured being quoted by everything.

The whole day at once

Each venue page shows its day as a map seen from above: hours across, crowd size up, colour for money. Here the same grid stands up. Across is the hour, into the picture is the crowd size, and the height is what the simulated bar takes in that hour. Drag a surface, or use its buttons, to turn it.

Hold the hour still and walk along the crowd axis: the height rises, peaks and falls. The slope of that walk is the partial derivative ∂R/∂N at that hour, and the crowd size where it reaches zero is the best crowd size for the hour, N*(t). Join those peaks hour by hour and you have the ridge drawn solid on each surface.

∂R/∂N(N*(t), t) = 0

A real night does not walk the ridge. It follows its own crowd, N(t), drawn dashed, and adding up the height under that path hour by hour gives the day's takings: the sum over the hours of R(N(t), t).

takings = ∑t R(N(t), t)

Sagebrush Cantina, Friday MODELED — simulated Ridge: best crowd size for each hour. Dashed: a typical simulated night. The venue's page →
Billy Bob's Texas, Fri & Sat MODELED — simulated Ridge: best crowd size for each hour. Dashed: a typical simulated night. The venue's page →
Kid Rock's Big Ass Honky Tonk, Every day MODELED — simulated Ridge: best crowd size for each hour. Dashed: a typical simulated night. The venue's page →
Cowboys Orlando, Thu-Sat MODELED — simulated Ridge: best crowd size for each hour. Dashed: a typical simulated night. The venue's page →

How the figures were made

Occupancies measured
421
Rooms per point
4 independent
Counted per room
2 hours
The bar
3 service points · 132s a drink
One drink lasts
67 min
Waiting at N*
8

The dataset behind every figure

Every figure above comes off one sweep of the engine, and the sweep's log across the occupancies this page argues about is published here — the same drinks, in the two formats a venue actually has: a point-of-sale transaction file and a door counter's five-minute buckets. Run the numbers back out of them and you get the curve on this page across that range, because they are the same measurement. That is what makes it the official dataset rather than a sample that resembles one.

It is not organic trading history and it is not dressed up as any. The occupancy is held still through each measured block, because that is what measuring one headcount means; the door is quiet between the fill and the empty; and the calendar is an axis rather than a story. Menu prices and tips are dressing — the prices are calibrated so the money in the file is exactly the pour it represents, and tips are in the file because they are in every real file, and are not counted as revenue.

Settled hours
1448
Occupancies covered
181
Measured blocks
724
Transactions
65512

illustrative example Pigfox Cantina — a fictional venue

One thing to know about the download: it covers occupancies up to 180, while the engine is now swept a good deal further. The published range has not shrunk — the table grew past it. We left the files where they were because a copy somebody already downloaded should not stop matching the one at this link, and everything this page argues about — the rise, the peak, N*, and the fall past it — happens inside the range you are getting.

Generated by the same engine as every figure on this page and reproducible with one command, so nothing here rests on trusting a file somebody uploaded.

What this model does not know

An honest figure comes with the list of things it leaves out, so here is ours. The simulated room has one door, one bar and one kind of patron. It does not know about parties arriving together, about a queue outside, about the weather, about a match on the screens, about last orders, about somebody buying a round for eight, about staff breaks, or about a patron deciding the wait is not worth it and going somewhere else. Every one of those moves a real curve.

It also does not know your room. Pigfox Cantina is a fiction — a plausible venue with invented parameters, built to make the SHAPE of the argument visible. The shape is what transfers. The numbers are not yours until somebody fits them to your transactions.

And the curve itself is a measurement, so it carries measurement noise. Past the posted capacity the simulated room is bistable — the crush at the rail either keeps shuffling or locks solid, and which one a given night does turns on where the crowd happened to be standing when it filled. Every point is the mean of several independent nights and the tail still wanders. That wander is in the figure rather than smoothed out of it, because it is a finding: past capacity, this room stops being predictable before it stops being profitable.