XP Curve Calculator: Level Curve Formula and Table
Pick an experience curve formula, set the base XP, growth and max level, and get the XP needed for every level as a chart and a table. Add how much XP an enemy gives to see how many kills and minutes each level takes, then download the table as CSV or copy it as a typed GDScript array or JSON.
How to use it
- Choose Linear, Polynomial, Exponential or Fast early, slow late and press Next.
- Set the base XP, the growth parameter and the max level, then press Next.
- Enter the XP an enemy kill gives and, if you want playtime, how many kills a player makes per minute.
- Press Build XP curve to see the charts, the level table and the totals to max level.
- Press Download CSV, Copy GDScript or Copy JSON to take the table into your game.
How the XP formulas compare
Each formula gives the XP needed to go from one level to the next. Linear adds a fixed amount per level: base + step x (level - 1). Polynomial raises the level to a power: base x level ^ exponent. Exponential multiplies the cost by the same factor every level: base x (1 + growth) ^ (level - 1). Fast early, slow late grows linearly up to a switch level and exponentially after it.
With a base of 100 XP and 30 levels, the default settings give very different games. Linear with a step of 50 needs 1,500 XP for the last level and 23,200 XP in total. Polynomial with an exponent of 2 needs 84,100 XP for the last level and 855,500 in total. Exponential with 10% growth needs only 1,442 for the last level and 14,861 in total, because 10% per level stays gentle over 30 levels, while 20% would need 16,484 XP for the last level alone and 25% would need 51,699.
Exponential curves look harmless early and then explode, so check the last rows of the table before you commit to one. Polynomial curves are easier to keep under control as the cap rises. An exponent of 2 makes level 10 cost 100 times level 1; 1.5 makes it about 32 times.
Pacing: kills and minutes per level
Kills per level is the XP needed divided by the XP one enemy gives, rounded up. Minutes per level divides that by how many kills a player makes per minute. Together they tell you whether level 20 takes two minutes or two hours.
With the default polynomial curve and a flat 25 XP per kill, reaching level 30 takes 34,220 kills, more than 140 hours at 4 kills per minute. That is the usual sign that enemy XP has to grow with level too. A common fix is to give higher level enemies more XP so that time per level grows slowly while the XP numbers grow fast.
Decide a target first, for example 2 minutes for early levels and 20 minutes near the cap, then adjust the growth until the Time column matches it. Remember to count quest rewards and other XP sources, or players will level faster than the table says.
Using the table in Godot 4
Copy GDScript gives a script with a typed const XP_TABLE: Array[int] holding the total XP needed to reach each level, a level and xp variable, an add_xp() function and a leveled_up signal. XP_TABLE[0] is level 1 and is always 0.
add_xp() uses a while loop, so a big reward can raise several levels at once and emit leveled_up for each one. Storing total XP instead of XP since the last level makes saving simple: save one integer and the level follows from the table.
Download CSV if you balance in a spreadsheet, or Copy JSON to load the curve at runtime with JSON.parse_string() in Godot or any other engine.
Frequently asked questions
What is a good XP formula for an RPG?
What is the difference between a linear and an exponential XP curve?
How do I calculate how many kills a level takes?
Should I store total XP or XP since the last level?
Why does the calculator stop at very large numbers?
More free game dev tools
- Loot Table Calculator: See each item's real drop chance and how many kills it takes, with optional pity.
- DPS Calculator: Balance combat: DPS with crits and armor, time to kill, and two builds compared.
- Skill Tree Maker: Generate a talent tree with prerequisites and point costs, edit it, and export it.