y is exactly x squared. Pearson’s correlation is 0.000000 — exactly zero, because x is symmetric about 0 — and the mutual information is 1.358298 bits, 57.0% of the smaller entropy. The relationship is deterministic and a correlation reports nothing at all.
25 pairs, 6 × 6 bins
I(X;Y) = 1.358298 bits
Pearson's correlation on the same data is 0.000000. H(X) is 2.5795 bits and H(Y) is 2.3827, so the normalised mutual information is 0.570071 — that share of the smaller entropy is accounted for by the other variable. The correlation is near zero and the mutual information is not, which is the case this measure exists for: a relationship that is real, strong and not monotone.
Mutual information
1.358298 bits
normalised 0.5701
Pearson's r
0.000000
linear only
H(X)
2.57947 bits
H(Y) = 2.3827
Joint entropy
3.60386 bits
H(X) + H(Y) − I
The relationship, plotted
The joint bin counts
The joint count table the mutual information is computed from
x bin
y1
y2
y3
y4
y5
y6
x1
0
0
0
1
1
2
x2
0
2
2
0
0
0
x3
4
0
0
0
0
0
x4
4
0
0
0
0
0
x5
1
2
1
0
0
0
x6
0
0
1
1
1
2
Mutual information is computed from exactly this table, which is why the bin count changes the answer. A table this sparse also inflates it: with many bins and few points, most cells are empty and emptiness looks like structure.
Zero if and only if independent Catches any dependence, not just monotone Says nothing about direction
What this tool shows
y = x² over a symmetric x has a Pearson correlation of exactly 0 and a mutual information of 1.358298 bits — 57.0% of the smaller entropy. The relationship is deterministic and a correlation reports nothing at all. The counterweight is on the same page: two genuinely unrelated columns of twenty points give 0.000000 bits at 2 bins and 2.321928 at 10, so the bin count is a visible control here rather than a hidden default.
Mutual information in bits from two paired columns
The joint bin table it is computed from, printed in full
Pearson’s r on the same data, for the comparison that is the point
H(X), H(Y) and the joint entropy, with a 0-to-1 normalisation
The bin count as a control, with the binning bias measured on an independent pair
A deterministic step relationship that a correlation reports as merely strong
Any dependence r beside it Joint table shown Bins as a control
The bin count changes the answer. It is a choice, not a detail.
Updated 13 September 2026 · Works in any browser, no installation
Mutual information is how many bits knowing one variable saves you when guessing the other. It is zero if and only if the two are independent — not merely uncorrelated — which is what lets it detect curved, periodic and step relationships that a correlation coefficient reports as nothing. It pays for that with a binning choice and no sign.
At a glance
Formula shown
I(X;Y) = Σ p(x,y) log₂[p(x,y) / (p(x)p(y))] over the joint bin table, which equals H(X) + H(Y) − H(X,Y). It is zero exactly when p(x,y) = p(x)p(y) everywhere — independence — and rises as the joint distribution departs from the product of its margins. The normalisation used here divides by min(H(X), H(Y)), so it reaches 1 when one variable completely determines the other.
Scenario support
Feature selection where a linear filter would discard a useful predictor, detecting non-monotone relationships in exploratory analysis, decision-tree splitting criteria, image registration, and any screen where "are these two related at all?" matters more than "how strong is the straight-line trend?".
Educational estimate
Planning support from the values you enter — not professional advice.
Exactly zero correlation, and a deterministic relationship
The shipped U-shaped preset is not a near-miss for a correlation. It is a case where the correlation is exactly zero and the relationship is exact.
y = x² with x symmetric about zero gives r = 0.000000. Not approximately: the positive and negative halves cancel exactly, so the covariance is identically zero.
And yet every value of y is completely determined by x. Mutual information reports 1.358298 bits at six bins, a normalised 0.570071 — more than half the smaller entropy accounted for.
The step preset makes the same point differently. y jumps at x = 10 and is constant either side, so y is a function of x. Normalised mutual information is exactly 1.000000 and the correlation only 0.867110 — a deterministic relationship reported as merely strong.
Which is the case for using it as a screening filter. A feature-selection step that ranks by absolute correlation drops the U-shaped predictor entirely, and mutual information keeps it.
The binning bias, measured on data with no relationship at all
Everything above is the case for the measure. This is the case against trusting a single number from it, and it is larger than most treatments admit.
Two unrelated columns of twenty points: 0.000000 bits at 2 bins, 0.278072 at 4, 0.421928 at 5, 0.819973 at 6 and 2.321928 at 10. Nothing about the data changed.
At ten bins nearly every cell holds one point, so knowing x pins down y almost exactly — within the sample. Emptiness looks identical to structure.
The bias is upward and grows with the number of cells relative to n. Which is the opposite direction from most estimation problems and means a large mutual information on a small sample is the expected result rather than a finding.
So the honest uses are comparative. The same bin count across candidate features, or a permutation null: shuffle y, recompute, and see how much of the observed value survives.
Rules of thumb for the bin count — √n, or Sturges’ 1 + log₂n — exist for exactly this reason, and the tool exposes the control rather than picking one silently.
Zero means independent, which correlation cannot claim
This is the theoretical property that makes mutual information worth the trouble, and it is stronger than the corresponding statement for a correlation.
I(X;Y) = 0 if and only if X and Y are independent. Both directions hold, which is not true of correlation: r = 0 follows from independence but does not imply it.
The U-shaped preset is exactly that gap. Uncorrelated and utterly dependent, which is possible precisely because correlation only measures one kind of relationship.
It is also symmetric: I(X;Y) = I(Y;X). Knowing x tells you as much about y as knowing y tells you about x, which means it says nothing at all about direction or causation.
And it is invariant to any invertible transformation of either variable. Taking logs, squaring positive values or rescaling changes nothing — unlike a correlation, which a monotone transform can move a long way.
Bits, and what a number of bits is worth
The unit is real but the scale is not bounded, which makes raw values hard to compare across datasets.
I(X;Y) is bounded above by min(H(X), H(Y)), so its maximum depends on how much entropy the variables had to begin with. Two nearly-constant variables cannot share much information because there is not much to share.
The normalisation used here divides by that minimum, giving 0 to 1 where 1 means one variable completely determines the other — which is what the linear and step presets both reach exactly.
Other normalisations exist and give different numbers: dividing by the joint entropy, by the arithmetic mean or by √(H(X)H(Y)) are all in use, and a “normalised mutual information” without a stated denominator is ambiguous.
And bits are only bits if the log base is 2. Natural logs give nats, a factor of 0.693 — the same unit trap as on the entropy page.
When a simpler measure is the better one
Mutual information is the most general dependence measure on this site, and generality is not free.
If the relationship is monotone, use a rank correlation.Spearman needs no binning, has a sign, has a known null distribution and is far less biased at small n.
If it is linear, use Pearson. It has an exact sampling distribution, a confidence interval and a direction, all of which mutual information lacks.
If you need a p-value, permute. There is no standard closed-form null for a binned mutual information, so shuffling one column and recomputing is the practical route — the same logic as the permutation test.
Distance correlation is the modern alternative for “any dependence at all”: it is zero if and only if independent, needs no binning, and has a usable permutation test.
Use mutual information when the relationship might be any shape and the data is plentiful, which is the regime its bias tolerates and its generality pays for.
Reporting a mutual information
Four things, and the first two are what make the number reproducible at all.
Give the bin count and how the bins were chosen. Equal-width, equal-frequency and a chosen count all give different answers on the same data.
Give n. The upward bias depends on the ratio of cells to observations, and a reader cannot judge the value without it.
Give a permutation null if the number is being used as evidence. “0.82 bits, against a shuffled median of 0.79” is a finding; 0.82 alone is not.
And say which normalisation you used, if any. There are at least four in common use and they do not agree.
Sources and methodology
References for mutual information and its estimation.
Method. Mutual information is computed from an equal-width joint bin table, and that table is printed rather than summarised — because the table IS the estimate, and its sparsity is the thing a reader most needs to judge. Pearson’s r is computed on the same pairs in the same pass, which is what makes the U-shaped preset’s exactly-zero correlation a property of the data rather than of a second implementation. The bin count is a control rather than a default, and the binning bias quoted on this page is a measurement on two genuinely unrelated columns: 0.000000 bits at 2 bins rising to 2.321928 at 10, on twenty points. The suite asserts that identical columns give a normalised value of exactly 1, that mutual information is symmetric in its arguments to machine precision, and that it is never negative. Fewer than four pairs, fewer than two bins and any non-finite value return no result. That engine is verified on every change against 100 assertions. The count and the per-case breakdown are published on the formula verification page.
Related calculators
Where this goes next:
Correlation CoefficientReports Pearson, Spearman and Kendall together with the scatter plot, and ships Anscombe's quartet built in — four datasets with an identical r of 0.816 that Spearman tells apart.
Shannon EntropyEntropy in bits, nats and bans with per-symbol contributions, efficiency and perplexity — and the demonstration that a sorted sequence and its shuffle give identical values to the last bit.
Spearman CorrelationComputes rho correctly as Pearson on the midranks, and beside it the 6Σd²/(n(n²−1)) shortcut every textbook teaches — which is exact only when no two values tie, and overstates the correlation when they do.
Permutation TestEnumerates every split below 400,000 — two groups of ten is 184,756 of them — so the p-value is a ratio of two integers with no distribution assumed anywhere.
Chi-SquareGoodness of fit and tests of independence with every expected count and per-cell contribution shown — because the validity condition is about expected counts, not observed ones, and most calculators hide them.
CovarianceSample and population covariance with a unit multiplier that shows why the magnitude is unreadable — rescaling x multiplies the covariance while leaving the correlation untouched.
An educational tool. Mutual information estimated by binning is biased upward, and the bias grows with the number of cells relative to the sample size — twenty unrelated points in a 10×10 grid produce 2.32 bits from no relationship at all. It also has no sign and says nothing about direction or causation.
Published a mutual-information tool that prints the joint bin table it is computed from, because that table IS the estimate and its sparsity is what a reader most needs to judge.
Shipped the case the measure exists for: y = x² over a symmetric x gives a Pearson correlation of EXACTLY 0 — the halves cancel identically — and a mutual information of 1.358298 bits, 57.0% of the smaller entropy. A step relationship makes the same point differently, with a normalised mutual information of exactly 1.000000 against a correlation of 0.867110.
Shipped the honest counterweight on the same page rather than a caveat at the bottom. Two genuinely unrelated columns of twenty points give 0.000000 bits at 2 bins, 0.278072 at 4, 0.819973 at 6 and 2.321928 at 10 — so the bin count is a visible control here, and a large value on a small sample is the expected result rather than a finding.
Made the bin count a first-class input for that reason, with a tab row rather than a hidden default, so the sensitivity can be seen by clicking rather than read about.
Verified that mutual information equals H(X) + H(Y) − H(X,Y) across 150 generated datasets, that it is exactly symmetric in its arguments, and that it never exceeds the smaller of the two entropies.
Add this calculator to your site
Responsive embed — and private: nothing your visitors type leaves their browser.