Assuming I know the Pokemon type, its attack, defense and stamina IVs (between 0 and 15), and the Pokemon level, how can I calculate its exact combat and health points?
It seems the formula has been cracked down by now, but I could not find it on the web. More specifically, here are my current conclusions:

As far as I can tell, Pokeassistant that calculates IVs (from CP, HP and dust to power up) knows the correct formula, including all the rounding issues: Inputting any parameters obtained from the game always gave me possible results for IVs, and when making a typo in a number, it often told me there were no possible IVs.

The website above actually gives explicit formulas:
HP = (Base Stam + Stam IV) * Lvl(CPScalar)
CP = (Base Atk + Atk IV) * (Base Def + Def IV)^0.5 * (Base Stam + Stam IV)^0.5 * Lvl(CPScalar)^2 / 10
Unfortunately, they don't explain what
Lvl(CPScalar)
is. I tried to deduce its definition by matching this formula with one found on other websites (0.095*Level^0.5
), but that did not work.
Best Answer
"CPScalar" is an incidental constant which varies by level range. Breaking this particular value out from its exponent and level coefficient (as per
level*(CPScalar)^2
) isn't actually productive, it's just a bit of unsimplified work showing through from how the value was reverse engineered.In truth, that component of the formula can be consolidated in a piecemeal function of level. As per reddit user
__isitin__
(whom your linked article also cites), the definitions for this function appear to be:f(lvl) = ( 0.01885225 * level )  0.01001625
f(lvl) = ( 0.01783805 * ( level  10 ) ) + 0.17850625
f(lvl) = ( 0.01784981 * ( level  20 ) ) + 0.35688675
f(lvl) = ( 0.00891892 * ( level  30 ) ) + 0.53538485
Keep in mind that pokemon get two increments for every player level, so a level input of, say, 11.5, for example, is legitimate.
This function should fit into the CP formula like so:
Attack * sqrt{Defense} * sqrt{Stamina} * f(lvl) / 10
I'm certain there are some imprecise breakpoints in there where I've discounted rounding steps or added my own. I wouldn't be surprised if the underlying function is actually founded on different (but similar) ratios, either. But unless I've made a mistake, these numbers should be accurate to the greatest practical degree.