fgo-docs

NP Gain

NP Gain formula

Attacking NP

NP% per hit =
(17)    Round Down(
(18)        Round Down(
(19)            offensiveNPRate
(20)            * (firstCardBonus + (cardNpValue * max(1 + cardMod, 0)))
(21)            * enemyServerMod
(22)            * (1 + npChargeRateMod)
(23)            * criticalModifier
            )
(24)        * overkillModifier
        )

Mapping of damage formula terms to buff actions:

Other constants lookup:

Defending NP

NP% per hit =
        Round Down(
(25)        Round Down(
(26)            defensiveNPRate
(27)            * enemyServerMod
(28)            * (1 + npChargeRateMod)
(29)            * (1 + defensiveChargeRateMod)
            )
            * overkillModifier
        )

Mapping of damage formula terms to buff actions:

Other constants lookup: