Has the world seen moral progress? The answer should not depend on whether one has a sunny or a morose temperament. Everyone agrees that life is better than death, health better than sickness, prosperity better than privation, freedom better than tyranny, peace better than war. All of these can be measured, and the results plotted over time. If they go up, that’s progress.

For John Gray, this is a big problem. As a part of his campaign against reason, science and Enlightenment humanism, he insists that the strivings of humanity over the centuries have left us no better off. This dyspepsia was hard enough to sustain when Gray first expressed it in the teeth of obvious counterexamples such as the abolition of human sacrifice, chattel slavery and public torture-executions. But as scholars have increasingly measured human flourishing, they have found that Gray is not just wrong but howlingly, flat-earth, couldn’t-be-more-wrong wrong. The numbers show that after millennia of near-universal poverty and despotism, a steadily growing proportion of humankind is surviving infancy and childbirth, going to school, voting in democracies, living free of disease, enjoying the necessities of modern life and surviving to old age.

And more people are living in peace. In the 1980s several military scholars noticed to their astonishment that the most destructive form of armed conflict – wars among great powers and developed states – had effectively ceased to exist. At the time this “long peace” could have been dismissed as a random lull, but it has held firm for an additional three decades.

Then came another pleasant surprise. Starting in the 1990s, political scientists such as Joshua Goldstein, who kept track of ongoing wars of all kinds, including civil wars and wars among smaller and poorer countries, noticed that the list kept getting shorter. Research institutes in Oslo and Uppsala compiled datasets of global battle deaths since 1946, and their plots showed an unmistakable downward trend. The per-capita death rate fell more than tenfold between the peak of the second world war and the Korean war, and then plunged an additional hundredfold by the mid-2000s. Even the recent uptick from the wars in Iraq and Syria has not brought the world anywhere near the death rates of the preceding decades. Other datasets show steep declines in genocides and other mass killings. The declines are precipitous enough that they don’t depend on precise body counts: the estimates could be off by 25%, 100%, or 250% and the decline would still be there.

In a recent Guardian article, Gray tries to shoo away these pesky facts, which he disingenuously calls a “new orthodoxy”. Far from being orthodox, the discoveries are typically greeted with incredulity and sometimes furious denial, because most people fall prey to a cognitive illusion and assess the world from headlines rather than data. As long as violence has not vanished altogether, there will always be enough explosions and gunfire to fill the news, while the vastly greater portion of the planet in which people live boringly peaceful lives is reporter-free and invisible. Only by systematically tallying wars and war deaths and plotting them over time can one reach a defensible conclusion about global trends.

Oblivious to this logical point, Gray indiscriminately enumerates every violent episode of the past century he can think of, including recent ones that killed a handful of people or none at all. But his laundry list shows only that rates of violence have not fallen to zero, not that they have remained unchanged. And it certainly doesn’t support the preposterously melodramatic claim that the advanced societies of western Europe – the safest places in the history of our species – are “terrains of violent conflict” in which “peace and war [are] fatally blurred”.

Equally innumerate is his observation that while the cold war superpowers never met on the battlefield, they supported proxies in civil wars. Civil wars are far less destructive than wars between great powers, and even civil wars went into decline with the end of the cold war a quarter-century ago. The numbers matter: the difference between a war with 8,500,000 battle deaths (like the first world war) and a war with 5,000 deaths (like eastern Ukraine) is 8,495,000 human beings who get to work, play, and love rather than rot in their graves.

Gray tries to wave off the battle death numbers by repeating the legend that during the 20th century the ratio of military to civilian deaths flipped from 9:1 to 1:9. In my book The Better Angels of Our Nature I noted that this meme originated in a counting error and has been debunked many times. Throughout history wars have displaced, and frequently have targeted, civilians. No one knows how the ratio has changed, but when battle deaths decline a thousandfold it hardly matters. A great-power war kills massive numbers of soldiers and civilians, a small war kills vastly fewer of each, and in the many parts of the world that see no wars at all, the number of civilian war deaths must be zero. More attention to the maths would also have disabused Gray of the gambler’s fallacy, which leads him to believe that major war is cyclical and due for a return. The data shows that wars are patterned at random, though with a probability that can change over time.

In a last diversionary tactic, Gray serves up a prolix disquisition on Aztec obsidian mirrors, which is somehow meant to show that quantification is like “sorcery”, “auguries”, “amulets”, and “prayer wheels”. But the inescapable fact is that whenever you use the words “more”, “less”, “rise”, or “fall” you are making a claim about numbers. If you then refuse to look at them, no one should take your claims seriously.