At first glance, building a moon-sized battle station seems incredibly expensive. A few students at Leigh University calculated that, assuming the mass/volume ratio of an aircraft carrier, a Death Star would cost $852 quadrillion, or 13,000 times the world's GDP.
According to Mother Jones' Kevin Drum, however, this isn't as costly as it looks. If the Empire has 1.75 million member worlds, and each has an average GDP of Earth circa 2500 (which would be about 20,000 times larger than the economic output of current Earth), then a Death Star would cost about 65x the average world's GDP. If only a fraction of Imperial planets contributed a portion of their revenue to the construction of a Death Star, that would come to a miniscule percentage of the Empire's economic output. Indeed, when viewed in that light, a Death Star is remarkably cost effective, provided it fulfills its purpose-"Rule through fear of force rather than force itself."
The only problem with this cost analysis is that it neglects the (potentially large) externalities of owning a Death Star, much less using it. As Seth Masket points out, Death Stars are natural targets for insurgent fighters, since destroying one would send a powerful signal to Imperial dissenters. The victory at Yavin IV, he notes, "was a huge public relations coup for the Rebellion." Losing a Death Star could embolden insurgents, and lead to a larger and more influential rebellion. That this is unlikely doesn't mean that it shouldn't be taken into account.
On the same token, for as much as the Death Star was built to intimidate planets into obedience, there can be no doubt that it inspired groups and individuals to join the Rebellion. As Princess Leia Organa maintained while under Imperial custody on the first Death Star, "The more you tighten your grip, Tarkin, the more star systems will slip through your fingers."
Indeed, no small number of talented Imperial pilots defected to the Rebellion after the destruction of Alderaan, and many would play critical roles in later battles. That a Death Star might actually prolong conflict is something that must be factored into the broader cost of the project. The same goes for lost economic output as a result of Death Star operation. If the Empire were to destroy other worlds-especially those as prosperous as Alderaan-it could have had a real and adverse effect on galactic commerce. The destruction of Corellia-a possibility, given the planet's habit of producing Rebel heroes-would have destabilized an entire sector of the galaxy.
None of this is to say that the Empire would have been better off without a Death Star, or that its destruction wasn't crucial to Rebel success. And it's possible that the psychic benefits of owning a Death Star would outweigh any of the drawbacks. But those drawbacks are part of the cost, and it's worth the time of Imperial bureaucrats to tease them out.