In the autumn of 779 there was a storehouse inside the palace at the Tang capital, and for twenty years nobody could say how much was in it.
The men who kept the keys were eunuchs.
The taxes of the empire were supposed to come into the state treasury, where the finance office counted them four times a year and a second bureau checked the books. But after the An Lushan rebellion the money had been moved into the emperor’s private store and handed to the eunuchs. More than three hundred of them ran the place. What came in and what went out, no minister of state was allowed to know.
In the fifth month of that year the emperor died. His son took the throne. In the eighth month a man just recalled from exile raised the matter to the new emperor’s face.
His name was Yang Yan.
The revenues of the empire, he said, are its foundation and the lifeblood of its people. In earlier times the greatest ministers had been chosen to guard them, and even then the state had feared to lose control. Under the present arrangement a handful of palace servants hold the nerve of the country, and the great officers of state do not know whether the treasury is full or empty. Hand the money back to the proper offices, he said. Work out what the palace needs in a year, and draw exactly that.
The emperor agreed.
That was the first account Yang Yan set in order. The one that mattered more was in the countryside: the land, and the people on it. That ledger had stopped making sense a long time ago.
A Ledger That Did Not Add Up
The old system was called the three levies, and it was simple enough to state. The state granted every adult man a plot of farmland. In return he paid a grain tax on the land, a cloth tax on his household, and a labour service on his own body, which he could buy off with cloth instead.
Land, body, household. Three things, three taxes.
The system rested on two supports: a distribution of land that kept every family supplied, and a register that kept track of who was where.
By the middle of the eighth century both supports had rotted through.
People moved. Land was bought and sold. The rich farms rolled up more and more ground while the small ones shrank. And the register was still written out of an old copy, listing men who had died or walked away years before. In some years the census office simply sent in sheets of empty paper.
Then came a stranger abuse. To raise more revenue, one official dug out the oldest registers and traced men who should long ago have been exempt, then demanded thirty years of back taxes from them. There was no one for the people to appeal to.
And then the rebellion broke the country open. Households collapsed. The tax rolls emptied. Where would the money come from? The military governors in the provinces simply taxed whatever they held themselves, and several separate offices collected revenue without anyone above them to say no. In the provinces where the armies were, the money went to feed the armies first, and very little went to the capital.
Worst of all was the sheer number of ways to take money. There were said to be several hundred separate charges, old ones never cancelled, new ones piled on top, and nobody could say where the list ended.
Where there was a way out, people took it. The rich took religious vows, or bought an official title, and were excused. The poor had no such door and the largest households, and they carried it all. The chronicle puts it in five characters: the upper households were at ease, the lower households laboured.
Those who could not carry it left.
And the more who left, the heavier the burden fell on the ones who stayed.
It was a spiral turning downward.
Spend First, Tax After
In 780 Yang Yan sent up a memorial asking to scrap the three levies altogether and replace them with a single system, to be called the two taxes.
A few sentences in it were quoted for centuries afterwards.
The first was this: before anything is collected, count what the state will spend, and then set the levy.
Put plainly, fix the spending first, and the revenue second.
That inverted the old rule. For as long as anyone could remember, a good government first calculated what it could collect and then decided what it could afford. Yang Yan turned it around.
A Roman would have found the idea familiar. In Rome the censor every five years registered citizens and assessed their property, and the assessment decided what a man paid and what he owed the army. What a state thinks a citizen is worth, and taxes him on that worth, is an old idea. What was new here was that a Chinese empire of the eighth century was reaching for it.
The second sentence mattered more than the first.
Every household, whether registered locally or newly arrived from somewhere else, was to be entered on the rolls where it actually lived. And no household was to be assessed by the number of adult men in it. It was to be assessed by its property, graded by how much it had.
Stop counting heads, in other words. Start counting wealth.
Alongside these came the rest of the plan. Travelling merchants would pay a tax of one part in thirty wherever they traded. The grain tax would be spread over the acreage actually under cultivation in 779. And the tax would be collected twice a year, in summer and in autumn, hence the name.
The memorial went up. The emperor gave it a five character answer: good, do it.
There was opposition. The old system, the objectors said, had been the law of the dynasty’s founders, four hundred years old, and could not be lightly changed.
The emperor did not listen.
The People Who Appeared
In the first month of 780 the court sent commissioners out into every province, to look at conditions and ask about hardship.
The work was handed to the provincial authorities and the prefects: go through households one by one, local and migrant alike, fix the grades of property, and work out each district’s yearly total. The old charges were to be stopped. And the decree added a hard sentence: anyone who levied a single coin beyond the two taxes would be prosecuted as a criminal.
For some months the commissioners measured land and counted people.
They looked at two things. Dependants, and property. How many hands a family had, and how much land, house, livestock and timber it owned. Grade the family. Upper, middle, lower. Each grade carried its own sum. Write it in the register, and send it to the central finance office.
What they found surprised a great many people.
Before the rebellion the registered population had stood at something near nine million households. After it, a count turned up less than a fifth of that. Now, going through the country again, the commissioners found the people who had spent the intervening years in the hills, or inside the great temples, or tucked away under the names of powerful families.
The number of households on the tax rolls came out far larger than the old figure.
Two official totals have come down to us, and they do not agree. Both tell the same story. The people of the empire had not really shrunk to a fraction of what they once were. They had simply stopped being counted.
The dynastic history sums up the effect in a set of parallel clauses that read almost like a boast. The people settled on the land without being forced to. The taxes came in larger without the rate being raised. The registers told the truth without being rewritten. The clerks found fewer cracks to slip their fingers into.
Bit by bit, the fiscal power that the provinces had taken away from the court came back.
Later scholars have doubted that the finest phrase in the whole plan was ever really carried out. Spending first and taxing after is hard to run, and the totals finally fixed look much like the old ones. But the idea behind it stuck: set the total once, and do not quietly exceed it.

When Money Grew Dear
A good law still has to be administered by people, and this one came apart in the officials’ hands.
The first trouble was with money itself.
The two taxes could be paid in coin, and the amount of coin in circulation was already far too small. When everybody had to sell grain and cloth to raise coin for the tax, grain and cloth got cheap and coin got dear.
That is the complaint that echoed longest. The tax was fixed in coin, and coin kept climbing. A good harvest meant cheap grain and a bad time to sell. A bad harvest meant borrowing. The poet Bai Juyi wrote it out plainly. Why must the summer and autumn taxes be paid every year in copper coin? The power of money grows heavier, and the strength of the farmer is spent.
The second trouble was the surcharge.
The decree of 780 had forbidden any charge beyond the two taxes on pain of prosecution. Officials found a way around it anyway.
They gave the extra a courteous name. They called it the surplus, and sent it up to the emperor every month as a token of loyalty. Bai Juyi put that in a line as well. It is called the surplus, offered to the throne, buying favour with the warmth stripped off my back.
In 787 the emperor was out hunting and fell into talk with a farmer named Zhao Guangqi. The harvests have been good these last years, the emperor said. Why do you look unhappy?
The farmer gave him an answer that stopped the conversation. Your majesty has proclaimed, he said, that beyond the two taxes there is no further service. But the exactions that are not part of the two taxes are now heavier than the two taxes themselves.
There was a third trouble too. The reform was meant to fold the old labour services into the two taxes and be done with them. The labour services did not stop. Old ones vanished and new ones were assigned in their place.
So the verdict has always been split.
Those who praise the reform say it pulled hundreds of small charges into one clear system and brought the control of money and grain back to the centre, and that it was a rescue. Those who condemn it say it took the illegal exactions of the past and wrote them into a lawful, permanent account, and that by reaching for spending first it taught the court to feel that money was always short.
Lu Zhi, a minister of the day, put the case against it to the emperor’s face. Property is a slippery thing to tax, he said. Wealth that is well hidden does not show; wealth left lying in a yard looks large. A family keeping houses and furniture that earn nothing is assessed on them, while a merchant’s working capital is not touched. A tax built that way, he argued, only teaches people to be sly and to move.
Both sides were describing the same object.
The Man Who Wrote It
The man who drafted the reform did not last long.
Yang Yan had gifts. He wrote beautifully and was famous young. He also had a long memory for slights.
Years before, he had served under a chief councillor named Yuan Zai. When Yuan Zai fell and was ordered to die, the man who handled the case was Liu Yan, the empire’s ablest financier. Yang Yan was caught up in it and sent into exile, and he blamed Liu Yan for the ruin.
When the new emperor took the throne, Yang Yan became chief councillor, and he went after Liu Yan.
First he stripped him of one office after another, the transport commission, the salt monopoly, the grain supply. Then he had him demoted to a distant prefecture. Then he arranged for an ally to accuse Liu Yan of complaining about the court and raising troops to rebel.
Yang Yan himself came forward and testified that it was true.
The emperor believed it. In the seventh month of 780 the court sent an agent in secret to Liu Yan’s posting and had him killed; only a dozen days later was a public order issued, saying he had been permitted to take his own life.
When the household was seized, what was found was two cartloads of books and a few measures of grain.
Everyone knew the man had been murdered.
Liu Yan had run the finances of the state for years, rebuilding the canal transport and the salt administration, and holding the empire’s money together through the worst of the war’s aftermath. Twenty years after his death, several of the officials running the treasury were men he had brought up.
Yang Yan had settled his score. He did not stand much longer himself.
Another chief councillor, Lu Qi, came into the government. Yang Yan despised him, and made a habit of pleading illness rather than eat at the same table. In the tenth month of 781 he was demoted and sent toward the far southern island of Hainan.
On the road, the emperor’s order caught up with him. He was to die.
He was fifty-five.
One poem of his survives from the journey south. A hundred thousand li away, he wrote, and in a thousand thoughts I know that I will not come back. Where is Yazhou? I must cross the gate of ghosts alive.
And the two taxes stayed.
They did not make the Tang strong again. The military governors remained, the fighting went on, and the extra levies never stopped rising. But the method, judging a family by what it owned rather than by how many men it had, was taken up by the dynasties that followed.
The land taxes of the Song, the Yuan, the Ming and the Qing all grew from this root. Eight centuries later, when a chief councillor named Zhang Juzheng pushed through the single whip reform, he was doing the same thing again: gathering the scattered charges into one account, and working it out from land and property.
The practice lasted eight hundred years.
The storehouse the eunuchs had kept, the register that no longer matched the fields, the farmers who ran and were one by one found again: all of it lies buried twelve hundred years deep. But the step between counting heads and counting wealth, once taken, was never given back.