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.

Step 1 of 3: Formula
Which kind of XP curve do you want?
Costs grow faster and faster but stay under control as the cap rises. Try an exponent between 1.5 and 2.5.

How to use it

  1. Choose Linear, Polynomial, Exponential or Fast early, slow late and press Next.
  2. Set the base XP, the growth parameter and the max level, then press Next.
  3. Enter the XP an enemy kill gives and, if you want playtime, how many kills a player makes per minute.
  4. Press Build XP curve to see the charts, the level table and the totals to max level.
  5. 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?
A polynomial curve such as base x level ^ 2 is a safe start: costs rise steadily without the late explosion of an exponential curve. Then tune it with pacing, so each level takes a little longer than the one before.
What is the difference between a linear and an exponential XP curve?
A linear curve adds the same extra XP every level, so the cost grows at a steady rate. An exponential curve multiplies the cost by the same factor every level, so it starts slow and then grows very quickly.
How do I calculate how many kills a level takes?
Divide the XP needed for that level by the XP one enemy gives and round up. The calculator does this for every level and adds up the total kills to the max level.
Should I store total XP or XP since the last level?
Total XP is simpler. You save one number, the level follows from the table, and changing the curve later does not corrupt saves. Show XP since the last level in the UI by subtracting the previous table entry.
Why does the calculator stop at very large numbers?
Totals above 9,007,199,254,740,991 cannot be stored exactly as numbers in a browser, and steep exponential curves pass that long before level 200. Lower the growth or the max level if you see that message.
  • 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.

See all tools