No game makes levels cost the same amount of experience. If it did, your hundredth level would arrive as quickly as your first, and the sense of progress would evaporate somewhere around level twenty.
So the cost grows, and how it grows is one of the more consequential decisions in a game's design. There are three common shapes.
Linear, quadratic, exponential
A linear curve makes each level cost a fixed amount more than the last. Total experience then grows with the square of the level, and the time per level grows steadily. It is gentle and predictable and it tends to feel flat late on.
A quadratic curve makes the cost per level itself grow with the level, so totals grow cubically. This is the common choice, because it keeps early levels fast enough to feel generous while making high levels an achievement.
An exponential curve multiplies the cost by a fixed factor each level. It produces a very clear soft cap, because the numbers run away so quickly that progress stops being meaningful rather than becoming impossible. Games with prestige systems often use it deliberately.
Minecraft stitches three together
Minecraft does something more interesting: it uses three different quadratics in three bands. Total experience to reach level L is
L² + 6L up to level 16, then 2.5L² − 40.5L + 360 up to 31, then 4.5L² − 162.5L + 2220 above that.
The effect is a curve that steepens twice. A level costs 9 experience at level 1 and 37 at level 15. Level 16 costs 42, level 30 costs 112, and level 40 costs 202. The Minecraft XP calculator shows the bands clearly if you step through them.
The joins are not arbitrary. Level 30 is the enchanting table maximum, so the curve is tuned to make reaching 30 a real session of work, and the third band exists to make everything beyond it feel like a deliberate choice rather than something you drift into. Getting from 0 to 16 costs 352 experience. Getting from 16 to 32 costs about three and a half times that.
Levels are not the unit you care about
The number above the hotbar is a level. The thing you spend to get there is time. Those are related by your earning rate, and converting between them is the calculation that actually informs a decision.
Ten thousand five hundred experience remaining sounds like an abstraction. At 3,200 an hour it is three and a quarter hours, which is a decision you can make. The XP to next level calculator does that conversion and reports it in sessions as well, because what most people want to know is whether this is two sittings or eleven.
The honest way to get your rate is to measure it. Note your experience, play twenty minutes the way you normally play, and multiply the difference by three. Estimating it from memory reliably overshoots, because the good runs are the ones you remember.
Stat curves do the same thing
The same design pressure shapes how stats grow. Pokémon is the clearest worked example, where a final stat comes out of base value, individual values, effort values, level and nature through one formula with two floors in it. Those floors create breakpoints where four effort points buy a stat and the next four buy nothing, which is visible in the Pokémon stat calculator.
Every designed progression has joins like these. Finding them is usually more useful than optimising between them. For another grind where the distribution is the whole story, see the piece on gacha odds.