There is no maximum max health set by the game, but the maximum you can get out of eating candies is 900 (the function on row 4 in the code below maxes out at 900). You need to eat about 2 700 000 candies to reach the cap. Any candies eaten after that do not matter at all.
You can get much higher by using
pains au chocolat in the Wishing Well to get more max health. (gameGiftHealth
in the code below)
That method goes all the way to the max integer of javascript as it is defined in the script (9 007 199 254 740 992).
var maxHp = 100;
if (Saving.loadString("gameGameMode") != "hard") {
maxHp += Math.ceil((1 - Math.exp(-this.game.getCandiesEaten().getCurrent() / 3000)) * 100) + Math.ceil((1 - Math.exp(-this.game.getCandiesEaten().getCurrent() / 400000)) * 800);
}
if (Saving.loadBool("gridItemPossessedHeartPendant"))
maxHp += 300;
if (Saving.loadBool("gridItemPossessedHeartPlug"))
maxHp = Math.ceil(maxHp * 1.2);
if (Saving.loadNumber("gameGiftHealth") > 0) {
maxHp = maxHp + maxHp * (Saving.loadNumber("gameGiftHealth") / 5);
}