For details of the math behind this calculator, see this article.

Divergence loss =