For the uninitiated, here’s how ticketing works for “Hamilton”: The box office posts seats months ahead of the actual performances; they sell out almost immediately. Many of those tickets quickly show up on resale websites with significant markup, up to 10 times their original face value. Fans who are unable to get box office tickets, or were unaware of the purchasing window, are stuck buying from the resale market.

By late April, a close friend and self-professed #HamilFan was weighing the cost of seeing the show while it still featured its original cast. Her husband bowed out, refusing to pay the asking price for a resale ticket. So I took his place and shifted my research into high gear, interviewing legitimate ticket holders, line-waiters, line-sitting services and lottery winners.

I also began tracking, by hand, the changes in the asking prices for each performance; I planned to use my data to plot our ticket-buying window. At some point, my friend’s husband asked: “Why don’t you write a script to do this?” Oh, right. I’m a programmer; that would indeed be more efficient.

I started coding. In the meantime, my plotting paid off. Online fan forums had it right: Last-minute buyers could wait for “cheap” resale seats, minimizing the money going to scalpers. In the last hour before a Friday evening performance, we bought two seats for just above face value. Scalpers probably got $200 out of us; StubHub’s fees took another $100. I grew even more fascinated with the last-minute price strategies.

I was now collecting asking prices programmatically. As the data accumulated, “Hamilton” won 11 Tony awards, and several of the original cast members — including the musical’s creator, Lin-Manuel Miranda — announced their departures from the show. Prices spiked with each of these developments, so I continued tracking — from April through July.

In the meantime, The Times’s theater and business reporters began working on an analysis of the money involved in “Hamilton.” By then, I had enough data to contribute a conservative estimate of what scalpers might be making from the musical over the course of a year: $60 million and up. That figure raised some eyebrows.

From the data, we identified certain patterns — like a significant overlap in inventory across a number of different resale websites. This signaled to us that software was helping scalpers maintain multiple listings. (Software development is my area of expertise at The Times.)

Another interesting pattern: Some “Hamilton” scalpers seem to be using software to automatically adjust ticket prices, particularly within the last four hours before a given show. (Some resale websites, like StubHub, only allow manual adjustments.) Do these patterns of activity point to illegal “ticket bots”? Perhaps — it was a legal gray area, according to my research.

In the end, without actual sales figures from StubHub, Ticketmaster and the like, there’s no way to know the actual profit range for “Hamilton” scalpers. But our estimate of $60 million is the best that can be gathered from publicly available data.

As for me, I feel lucky to have stumbled into tracking a singular moment in Broadway history. I’m also the proud owner of a box-office ticket in … January 2017. And a nosebleed seat in Chicago, later that year.

Leave a comment