The U.S. B-2 bomber is the most expensive warplane ever to enter service. It's also one of the most expensive aircraft to maintain, costing about $3.4 million a month per aircraft just for that. For every hour in the air, about 60 man hours of maintenance are required. The B-2 often flies missions lasting over 30 hours. The extensive maintenance needs of the B-2 keep at least a third of them out of action at any given time. As a result, the aircraft is often referred to as a "hanger queen" (an aircraft that spends most of its time in a hanger getting fixed).
The 21 B-2s built ended up costing over $2 billion each. About half of that was development expense. At the time these aircraft were built (in the 1990s), they cost as much as a major warship. The B-2 has similar needs, including periodic (every seven years), lengthy (13 months) refurbishment (programmed depot maintenance, or PDM). Most of the PDM is devoted to refurbishing structural stealth features. PDMs, upgrades and operating costs nearly double the cost of each B-2 over its service life (30 or more years). There are 19 B-2s in service, and one used for R&D. One was lost in a 2008 accident.
The U.S. B-2 bomber takes a lot of heat for its high price. Actual construction costs for each of those aircraft was about a billion dollars. Still pretty high, mainly because a lot of special machinery and factories had to be built to manufacture the many custom components. The air force likes to point out that if the original (1986) plan had been followed, each B-2 would have cost half a billion dollars each. But then the entire program would have cost $58.2 billion, versus $44.3 billion for the 21 plane program (which included $10 billion more R&D expense).
New technology gives a weapon, especially an aircraft, an edge in combat. But since World War II, most military technology has been developed in peacetime conditions. This means it is more than twice as expensive, as there is no wartime urgency to overcome bureaucratic inertia (and emphasis on covering your ass, which is very time consuming and expensive) and hesitation (because you don't have a war going on to settle disputes over what will work best). As a result, developing this technology takes longer in peacetime, which also raises the cost. Worst of all, fewer units of a new weapon are produced (driving up the amount of development cost each weapon will have to carry.) If several hundred B-2s were produced under wartime conditions, each aircraft would have probably cost $200 million each, or less. In other words, a tenth of what it actually cost.