The bands have played, the marchers paraded, fireworks shot skyward, and hot dogs and beer copiously consumed as Americans everywhere have celebrated the 237th birth of freedom for our nation.

Before the elation of the Fourth of July fades, however, it might be time to contemplate the cost in blood and treasure of gaining and keeping that freedom. It is said that freedom is not free, which may be a cliché but it is rooted in truth.

The first to die fighting for America is believed to have been Crispus Attucks, a former slave of African and Indian descent who led a confrontation against British soldiers in Boston in 1770 and was shot along with four white men.

Over the next eight years, 4,435 Americans were killed in the Revolution and then another 2,260 in the War of 1,812 fighting off the British seeking to recapture the U.S. While not big numbers by modern standards, those casualties came from a nation of 5.3 million struggling to survive along the Atlantic seaboard.

The most horrendous bloodletting in American history was the Civil War in which 620,000 Union and Confederate soldiers died, about 100,000 more than those killed in World Wars I and II combined. The 405,400 killed in World War II comprised the largest number of deaths in a foreign war.

Since the end of WWII, another 100,700 Americans have died in Korea, Vietnam, the Persian Gulf, Iraq, and Afghanistan, plus smaller operations such as those in Lebanon, Grenada, and Panama. Of the 68 years since 1945, Americans have been in battle for 40 years.

Since the Revolution, American taxpayers have spent $6.8 trillion on military operations, the largest single amount having been $4.1 trillion for World War II. That is in constant dollars, with inflation factored out, and does not include veterans benefits, interest on war-related debt, or aid to allies.

A critical point: Unlike many nations in Europe and Asia, all commitments of American armed forces and military budgets have come at the direction of elected political leaders in the White House and Congress. U.S. military leaders have bowed to civilian authority and been more cautious in applying armed force because it is their soldiers who will die.

When General Colin Powell was chairman of the Joint Chiefs of Staff in 1993, he advised against committing U.S. forces unless political objectives had been set. In a meeting, the ambassador to the United Nations, Madeleine Albright, asked: “What’s the point of having this superb military that you’re always talking about if we can’t use it?”

Powell exploded: “I thought I would have an aneurysm. American GIs were not toy soldiers to be moved around on some sort of global game board.” Powell, who was later secretary of state, then calmed down and explained that U.S. forces had performed well when operating with a clear objective set by the president.

The current chairman of the JCS, General Martin Dempsey, took a similar tack last week in an opinion article in the Washington Post, urging soldiers and civilians to forge a better understanding of each other’s role in America.

“The last decade of war has affected the relationship between our society and the military,” the general wrote. “We can’t allow a sense of separation to grow between us. As the all-volunteer force enters its fifth decade, civilians and the military need to maintain the shared understanding necessary for a healthy relationship.”

A point that may not be immediately apparent as the debate over military spending swirls through Washington: It is far less costly in blood and treasure to build an armed force that deters a potential aggressor than it is to be caught unprepared and be forced to mobilize hurriedly.

The U.S. experience in World War II, when Americans were not ready to meet threats from Germany and Japan and had to drop everything to mobilize once the threat became real, underscores that point. So do the casualties and costs of that war.

In contrast, the Soviet Union and the U.S. deterred each other during the Cold War with Mutual Assured Destruction. If one started a war, the other would have sufficient power to survive and strike back. Both would have been devastated. Scary and dangerous but it worked.

Deterrence has deep roots in America. President George Washington said: “If we desire to secure peace, it must be known that we are at all times ready for war.” President John Kennedy echoed: “It is an unfortunate fact that we can secure peace only by preparing for war.”

Richard Halloran, who writes the weekly column called “The Rising East,” contributes articles on Asia and US relations with Asia to publications in America and Asia. His career can be divided into thirds: One third studying and reporting on Asia, another third writing about national security, and...