Experienced required for a certain level:
Fast 0.8(Level^3)
Medium (Level)^3
Slow 1.25(Level^3)
Parabolic 1.2(Level^3) - 15(Level^2) + 100Level*- 140
source: http://www.math.miami.edu/~jam/azure/compendium/training.htm
To solve level from XP... just input the experience you have = the formula from above.
So, say you have 100,000 XP. With the fast growth method, you have:
100,000 = 0.8*(L^3), then solve for L. L=50.
==
For knowing what Pokemon has what growth method, it's set in the ROM per species, so you'd have to build a table of what species uses what method if you were aiming to make a program. Or you can just look up the species on any online dex like Serebii or Bulbapedia.