# Need Some Help With Member Experience Formula

### #1 ShoeLace1291

ShoeLace1291

• Members
• 396 posts

Posted 29 August 2013 - 07:33 PM

I am developing a PHP application that will have a member login and profile system.  I have created a table for storing member's experience(exp) for certain actions.  For example, if they create a new forum thread, add a comment to an article, etc, they will earn a certain amount of exp.  I have found a formula that will calculate the member's exp level.  I need to find their progress percentage based on the exp required for the next level.  For example, if they are level 1 with 75 exp and it takes 100 exp to level up to 2, then they are 75% of the way to level 2.

What this formula I need should do is find out the total exp needed for the next level.  I can get the percentage from there.  Below is the formula I currently am using.  Any help is greatly appreciated!

```
\$experience = 18714;
\$level = pow((\$experience / 1000), ( 7 / 10));
\$level = floor(\$level);

echo \$experience; // Would output '7'

```

PS:  Any input on adjusting the \$level formula to make it harder or easier to level up is welcome!

### #2 requinix

requinix

Hopeless Member

• Moderators
• 5,990 posts
• LocationWA

Posted 29 August 2013 - 08:48 PM

```L = (E / 1000) ^ (7 / 10)
L ^ (10 / 7) = ((E / 1000) ^ (7 / 10)) ^ (10 / 7)
= (E / 1000) ^ (7 / 10 * 10 / 7)
= E / 1000
1000 * L ^ (10 / 7) = E```
Protip: WolframAlpha is pretty cool
- Solve for E
- Graph of L for E=0 to 20k (shows that you gain levels more slowly)
- Graph of E for L=0 to 50 (shows that it takes more and more experience to level)
- Graph of ΔE for L=0 to 10 (shows how much more experience is required between levels)

- That's a lot more experience than the 75 and 100 you used in your example. Maybe you want to tone it down?
- This assumes members begin at E=0 L=0. If they start at E=0 L=1 then the equations need to change a little

Edited by requinix, 29 August 2013 - 08:49 PM.

When in doubt, CHECK YOUR ERROR LOG

#### 0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

Cheap Linux VPS from \$5
SSD Storage, 30 day Guarantee
1 TB of BW, 100% Network Uptime

AlphaBit.com