Every decade the US conducts a census, and while your reasons in the past for not filling it out have been pretty weak, you’re really out of excuses in 2020.

Don’t have the time? You do. Thanks to the coronavirus quarantine, it’s either this or rewatch the whole of “The Office” for a third time.

Missed the form in the mail? Who are you kidding? You haven’t left the house in days.

Not sure how many people reside in your abode? Just look up. There they all are, every one of them, sitting uncomfortably close to one another, wondering why this apartment is suddenly so small.

And even now, while the nation is coming to grips with a national crisis, the census is not to be taken lightly. It is crucial to the government’s function, and we’ve been doing it for 230 years in the US — even during times of war, says author Andrew Whitby.

“On one hand it’s this dry, mechanical statistical, boring backwater of government exercise,” Whitby says. “But at the same time there’s a historic aspect to it that’s beautiful.”

Whitby is a data scientist and Brooklyn resident whose new book — “The Sum of the People: How the Census Has Shaped Nations, From the Ancient World to the Modern Age” (Basic Books), out Tuesday — covers everything you could possibly want to know about the exercise of counting heads

The Chinese emperor Yu, who died in 2025 BC, was said to have conducted the earliest written census. That ancient count, like most censuses, went far beyond just tallying the number of people — and was used for taxation, conscription and land apportionment, among other purposes.

The US count, too, goes beyond a simple number and has an especially important function — the underpinning of democracy itself.

“This is very much an American innovation,” Whitby says.

Among the early greats, Benjamin Franklin was one of the stronger advocates of demographics. In the 1750s, he published essays examining America’s population growth.

The other Founding Fathers also understood the importance of a population count, and, after a long debate, enshrined a census in the Constitution.

The number was crucial because it was used to apportion the House of Representatives according to population. The more people you had, the more say you got.

The young government delegated the task to the US marshals. That bureau appointed 650 assistants (paid $1 per 150 people counted, or 300 in urban areas) to do the actual enumeration.

The Constitution’s drafters butted heads about how to count the country’s slaves, with some in the North arguing that they should be omitted from the census entirely, and those in the South arguing that they should count the same as free people. (Native Americans were not counted at all.)

In the end, the infamous Three-Fifths Compromise was reached, whereby five enslaved people were counted equal to three free citizens.

America’s first census in 1790 took 18 months to complete, and in October 1791, George Washington announced the United States’ population at 3,929,214.

Many people, including Washington and Thomas Jefferson, suspected an undercount. Whitby found that Franklin’s own granddaughters had somehow been omitted.

By the late 1800s, the count increasingly “attracted greater interest from an increasingly numerate public, curious about the quantifiable aspects of the nation,” Whitby writes.

As the nation’s population grew, however, counting everyone began to become too time-consuming and expensive. The amount of data collected had also grown, ballooning from a reasonably simple head count to, by 1880, a form that contained 22 questions, covering everything from occupation, marital status, place of birth and health, including whether you were blind or “maimed.” That 1880 count provided such a tsunami of data that tallying it took nearly the whole of the 1880s.

The data was collected on cards and transported to Washington, DC, by train, to be laboriously hand-counted by clerks.

“It was just an impractical way of doing it,” Whitby says.

For the 1890 census, the government looked for a better way.

Herman Hollerith was a native of New York state and an engineer who had graduated from Columbia. While working on the 1880 census, he had a conversation with a colleague in which they had lamented the lack of a “machine for doing the purely mechanical work of tabulation.”

Hollerith began work on an electric device that would use punch cards for information processing. He patented his invention in 1889, and the US census would become his first serious customer.

Practically every census going back to 1980 has been wrapped up in debate. - Andrew Whitby, 'The Sum of the People'

For the 1890 census, he took over a Washington DC office and set up his machine, which was about the size of a writing desk. The cabinet displayed forty dials arrayed in four rows and ten columns.

Each person in the United States was represented by a 6 ⁵/₈-inch-by-3 ¹/₄- inch punch card that was fed into the machine by a clerk. The card was tallied, with various data points indicated by the placement of holes in the card, and then automatically sorted into one of 26 boxes.

What once took up to 55 hours by hand took Hollerith’s device just 5 and a half. His machine is estimated to have saved the Census Office two years and $5 million.

Hollerith went on to found a firm called Tabulating Machine Company. In 1924, the company adopted a new name: IBM.

For better or worse, his invention ushered in the age of big data, as it became possible to quickly navigate mountains of information. “The punch card changed the relationship between the individual and central government,” Whitby writes, removing the technical barrier to mass surveillance.

In the 19th century, however, privacy was still a novel concept. Up to the 1840 census, data was publicly displayed in each town so that it could be checked for errors.

By 1890, when the census began asking questions about “debt and disease,” the public began to push back against what the New York Sun labeled “an outrageous invasion.”

“Around 1910, people became more concerned with what would happen to the data,” Whitby says. “President [William Howard] Taft had to make a specific statement that the data wouldn’t be used to harm you.”

But there have been cases in which the census data was used for dubious purposes. In World War I, it was mined to locate people who weren’t registering for the draft. And during World War II, it was used to identify Japanese-Americans whose names and addresses were likely passed on to authorities for internment.

Census data was considered so powerful that Allied bombers during World War II targeted government buildings in Holland storing the demographic information of Dutch citizens in order to make it easier for the resistance to forge identity cards.

As the decades have gone by, many citizens have become more suspicious of the census, and when each new count rolls around, one controversy or another frequently dogs it. Any changes are often viewed with skepticism.

“Because the US census is so tied to the distribution of political power, what was a brilliant innovation is now kind of an impediment to the census,” Whitby says. “The census just can’t make a purely technical decision in order to produce a better number. Practically every census going back to 1980 has been wrapped up in debate about how to do it.”

This year is no different.

In March 2018, Secretary of Commerce Wilbur Ross (whose department is responsible for the census) submitted a list of census questions to Congress to be included on the 2020 version. It included a new query: “Is this person a citizen of the United States?”

Shortly thereafter, a coalition of states and counties, led by New York, sued in federal court, arguing that the question would lead to a significant undercount of Latinos and immigrants. The question was ultimately removed after a 2019 ruling by the Supreme Court.

While it’s true the census has previously asked about citizenship, since 1950 that question has only appeared on the long form questionnaire sent to a fraction of households.

“To use the era before 1950 as precedent in 2020 was to ignore six decades of intentional policy on the part of the Census Bureau to keep the short-form questions — sent to all households — as brief and unobjectionable as possible, in order to maximize response rates,” Whitby writes.

And get this: When you choose to fill out your census form either by mail, online or when a worker appears at your door, the government (which is to say, you) will have spent the cost of a decent dinner to obtain that data. The 2020 census is set to cost $16 billion — or yes, $48 per head, up from $8 in 1970 and $24 in 2000.

Other countries shell out far less, Whitby writes. China and India spend under $1 per person.

But the United States has far more incentive to get it right, because the political stakes are so high, even beyond representative government. At last count, $1.5 trillion in federal money was apportioned to state and local governments based on census data.

The census is also the baseline for every other statistical survey the government conducts. “It’s this linchpin of the whole statistical system,” Whitby says. “I think it still plays an important part in framing the discussion about who we are as a country.”