I know one formula to calculate:
EXP you need to advance from level (x-1) to level x (x is the level you wann receive here):
50 (x²-5x+8)
But if you wanna know from level 358 to level 400, i would recommend you following link http://www.tibia-stats.com/index.php?akcja=expCalc or the Fansite Tibia-Stats. You can figure out what EXP you need.
If you currently have 6 million and wanna reach lvl 400 it says you need 1.044.779.800 EXP.
Hope that helped you :-)
EDIT:
from lvl 358 to lvl 359 is the difference 6.354.700 exp
from lvl 399 to lvl 400 is the difference 7.900.400 exp
So if I counted right (^^) it is every lvl ~36.802 exp more you have to gain than the lvl before.
EDIT 2:
here is the Tibia calculator
https://www.tibia.com/library/?subtopic=experiencetable