SSIM Calculator — Structural Similarity Index
Measure how perceptually close two images are. Upload a reference and a distorted version to get the Mean SSIM over an 11×11 Gaussian window, or paste two pixel lists to hand-check the maths. You get the score, a quality band, and the luminance, contrast and structure breakdown. Verified against scikit-image.
How it works
SSIM (Structural Similarity Index) measures how close a distorted image — compressed, denoised, super-resolved or generated — is to a reference, but unlike pixel-error metrics it models how the human eye reads a scene: as structure rather than isolated pixels. It is defined by Wang, Bovik, Sheikh & Simoncelli (2004) and implemented as the de-facto standard by scikit-image, which this tool cross-checks against.
- Local statistics. For two aligned signals x and y over a window, compute the means
μx, μy, the sample variancesσx², σy²(divided by N−1 to match scikit-image), and the covarianceσxy. - Stabilising constants.
C1 = (K1·L)²andC2 = (K2·L)²with K1 = 0.01, K2 = 0.03 and L the dynamic range (255 for 8-bit) — giving C1 = 6.5025 and C2 = 58.5225 at L = 255. - Three comparison terms. Luminance
l = (2μxμy + C1)/(μx² + μy² + C1), contrastc = (2σxσy + C2)/(σx² + σy² + C2), and structures = (σxy + C2/2)/(σxσy + C2/2). - Combine. With the usual weights (α=β=γ=1),
SSIM = l · c · s, which is algebraically the single fraction[(2μxμy + C1)(2σxy + C2)] / [(μx² + μy² + C1)(σx² + σy² + C2)]. The tool shows both and confirms they agree as a cross-check. - Mean SSIM for whole images. Both images are converted to luminance, then an 11×11 Gaussian window (σ=1.5) slides across them computing a local SSIM at each position. Averaging those windows gives the Mean SSIM (MSSIM). Identical dimensions are required and validated up front; nothing is uploaded — all of this runs in your browser.
The coloured quality band (essentially identical ≥ 0.99, excellent 0.95–0.99, good 0.90–0.95, fair 0.80–0.90, poor < 0.80) is a widely used heuristic for a quick read, not part of any standard — the page says so next to the result. SSIM is single-scale here; multi-scale MS-SSIM and video SSIM are out of scope for this version.
Worked examples
Frequently asked questions
Sources & references
- Wang, Bovik, Sheikh & Simoncelli (2004) — Image Quality Assessment: From Error Visibility to Structural Similarity (IEEE TIP)
- scikit-image — structural_similarity (reference implementation)
- Structural similarity index measure — definition and formula
The SSIM formula, the C1 = (K1·L)² / C2 = (K2·L)² constants, and the 112 Gaussian-window Mean SSIM on this page were last cross-checked against the Wang et al. (2004) paper and scikit-image on 2026-06-26. The quality bands are explicitly labelled as heuristics, not a standard.
Related tools
Comments & feedback
Spotted a bug or want an improvement? Tell us — our team reviews every comment, and good ideas get built. Comments are public and anonymous.
Found a bug, edge case, or want to suggest an improvement?
Email me at [email protected] — most fixes ship within 24 hours.