Jensen Shannon Divergence Calculator
Compare two normalized category distributions using base-two Jensen–Shannon divergence and its square-root distance.
YOUR CALCULATION
Result
—
Calculation steps
Work through one step at a time or reveal the complete calculation. The steps use your current inputs.
How to calculate
Normalize each weight list independently; handle zero-probability categories by their limiting zero contributions.
M=(P+Q)/2; JS=½ KL(P||M)+½ KL(Q||M), with base-two logarithms
Worked example
Disjoint distributions (1,0) and (0,1) give JS=1 bit and square-root distance 1. Identical normalized distributions give zero.
Assumptions and input details
Matching category order and positive total weight in each list. Equal mixture weighting and base-two log are explicit. KL(P||Q) is shown as infinite when Q has a zero where P is positive. No empirical sampling uncertainty or semantic matching.
Using this calculator
Can I enter my own problem?
Yes. Replace the example values with your own inputs. The result, calculation steps, tables and applicable diagrams update from those inputs. Blank or invalid values clear the result; example values are never silently substituted for missing inputs.
Are the results exact?
Results use floating-point arithmetic and displayed rounding. Read the formula, assumptions and any stated data precision before interpreting the result.
Is my input uploaded?
The calculation runs in your browser. No account, file upload or external AI service is required. Inputs are not saved between page reloads.
Calculate empirical entropy, observed support and ideal coding bounds from labelled symbol counts.
Calculate plug-in mutual information, marginal entropies and conditional entropies from a categorical count table.
Compare two entered item sets with Jaccard, Sørensen–Dice and overlap similarity, plus an item-by-item membership table.
Reserved advertising space.