The nearly two-decade war in Afghanistan has cost the United States $2.26 trillion, according to a new analysis by Brown University.

But even after the last American service member leaves Afghanistan later this year, as the Biden administration has pledged, the costs will continue to rise, according to Brown's Watson Institute for International and Public Affairs.

In its Costs of War report released Friday, the Watson Institute tallies the staggering expense of the nation's longest war, as the Biden administration prepares to withdraw the last few thousand troops from Afghanistan no later than Sept. 11.

The analysis collected the estimated congressional appropriations for the war, including operations in both Afghanistan and Pakistan.

The greatest single expense — $933 billion, or 41% of the war effort's total costs — came in the Defense Department's Overseas Contingency Operations spending, the report states. The controversial OCO budget, which was used to pay for war efforts, was unaffected by budgetary caps imposed on the rest of the department and grew significantly over the years.

But the DoD's base budget also saw its own war-related increases, apart from the OCO budget and the costs of actually waging war in Afghanistan. The Watson Institute said the military's overall budget grew by an additional $443 billion, making it the third-largest cost of the war.

The interest costs, totaling $530 billion, from borrowing money to pay for the war, make up the effort's second-biggest expense.

The study said that the US has also spent $296 billion to care for veterans of the Afghanistan war.

The State Department's own OCO war budget cost $59 billion, according to the report.

But these costs are not yet done accumulating. The Watson Institute said its analysis did not include the costs of lifetime care for war veterans or future interest payments on money the US borrowed for the war.

The report estimates that up to 241,000 people died in Afghanistan and Pakistan as a direct result of the war.

The war cost the lives of 2,442 US troops, six DoD civilians, 3,936 US contractors, and 1,144 allied troops, the report states. Between 66,000 and 69,000 Afghan national military members and police, as well as another 9,314 Pakistani troops and police, also died.

More than 71,000 civilians — roughly 47,000 in Afghanistan and 24,000 in Pakistan — died, according to the report. And more than 51,000 opposition fighters died in Afghanistan, as did another roughly 33,000 in Pakistan.

The report said that about 136 journalists and media workers, and 549 humanitarian workers, also died in the war.