RPG Maker VXAce ToNextLevel XP Formula?

I have seen plenty of post with the Total XP Formula but haven't seen any with the ToNextLevel Formula so I just thought I would ask does anyone know it? Please, Thank you 😉
It's in the code for Game_Actor and in Window Status it is shown with a small calculation.
game actor uses next_level_exp which is exp_for_level(@level + 1)
that method then gets self.class.exp_for_level(level).
In the database you defined what the settings were for how a characters exp is calculated in the game for each level. so it just gets this number.

The window status just takes that number and subtracts the current exp to show the exp required to get the next level
OMG Thx so much I did have a slight feeling that was how it calculated the XP but was overthinking it lol it works now.

For anyone else that wants to know basically the Formula just subtracts the CurrentXpTotal by the PreviousXpTotal to get the XpToNextLevel

Example: 38 - 10 = 28

Original thread: https://forums.rpgmakerweb.com/threads/rpg-maker-vxace-tonextlevel-xp-formula.160063/