Phones are more expensive than ever. Flagship devices from Apple, Samsung, Google, and other top manufacturers can now cost hundreds of dollars more than they did just a couple of years ago. Now, with the arrival of foldable phones, which are being priced at $2,000 and above, it looks like the upper limit for phone prices is going to keep growing.

There are a few different reasons why phone prices have been skyrocketing over the past several years. The first is simple: it’s just sticker shock. In the United States, flagship phones used to cost $200 as part of a mobile phone contract, while their real cost was hidden away in monthly fees. Now that those contracts are dead, phone prices are all stated outright. That explains why, several years ago, the iPhone’s price suddenly jumped up to $649. (Albeit, you’re likely to pay that broken up into monthly chunks.)

Contracts dying is one reason; phones using more expensive parts is another

But sticker shock isn’t the whole story. Phone prices really have jumped another several hundred dollars. In 2016, for example, Samsung charged $670 for a brand-new Galaxy S7. This year’s Galaxy S10 starts at $900.

That’s in large part because phones are getting harder to sell. Far more people own a smartphone today than just a few years ago, and people are holding on to their phones for longer (perhaps because they’re so good, or perhaps because those two-year contracts are dead). That’s left smartphone makers with an option if they don’t want to see their revenues fall: sell more phones or sell more expensive phones. Obviously, they’ve chosen the latter.

We’ve seen options for bigger screens and more storage push the price for flagship phones into the $1,500 range. Even the starting price for today’s flagships is closer to $1,000 than the $649 of just a few years ago.

But this isn’t necessarily just a bunch of uncalled-for price hikes. For one, the cost to build a high-end phone is rising: the parts inside an iPhone 4 from 2010 added up to under $190; the parts inside last year’s iPhone XS Max came out to $390, according to IHS Markit. Some of the markup is also due to inflation. According to the Bureau of Labor Statistics’ online calculator, $649 in 2010 would be worth $750 today, which is very nearly the cost of an iPhone XR.

In many cases, these extra pricey phones are essentially alternate, higher-end models. It’s less that the iPhone now costs $999 and more that Apple now sells an even higher-end iPhone model. The same goes for Samsung: while the Galaxy S10 starts at $900, a cheaper model, the S10E, begins around $750, and you really don’t miss out on much.

The downside of this trend is that, yes, you’ll now have to spend more than you did just a few years ago to get the absolute best phone out there. But the upside is that the phone you buy is likely to be nicer, and you’re likely to hold on to it for even longer. So unless you’re still buying the best every two years, you might not end up spending all that much more.