PSNR Calculator — Peak Signal-to-Noise Ratio
Compute PSNR in decibels for image and video quality. Enter a known MSE and bit depth, or paste two pixel-value lists and let the tool derive the MSE first. You get the PSNR, the MAX peak value, a plain-English quality band, and the full derivation. Formula verified against scikit-image and MATLAB.
How it works
PSNR (Peak Signal-to-Noise Ratio) measures how close a reconstructed signal — a compressed, denoised or super-resolved image — is to its original. It is the standard objective metric for image- and video-compression work, reported on a logarithmic decibel scale where a higher number means less distortion. This calculator follows the same definition used by scikit-image and MATLAB.
- Find the peak value. The maximum representable pixel value is
MAX = 2^bits − 1: 255 for an 8-bit image, 1023 for 10-bit, 4095 for 12-bit, 65535 for 16-bit. - Get the MSE. If you already know the mean squared error, enter it directly. Otherwise the tool computes it from your two pixel lists using
MSE = (1/N)·Σ (xᵢ − yᵢ)²— the average of the squared differences between the original valuesxᵢand compressed valuesyᵢover N samples. - Apply the PSNR formula.
PSNR = 10·log10(MAX² / MSE), measured in decibels. This is algebraically the same as20·log10(MAX) − 10·log10(MSE), and the calculator shows that second form as an independent cross-check so you can see both agree to the rupee — here, to the decibel. - Handle the identical case. When the two signals match exactly, MSE = 0 and the ratio is divided by zero, so PSNR is mathematically infinite. Rather than erroring, the tool reports
∞ dBand labels it as lossless.
The coloured quality band (Excellent ≥ 40 dB, Good 30–40 dB, Acceptable 20–30 dB, Poor < 20 dB) is a widely-cited engineering heuristic for 8-bit images, useful for a quick read but not part of any formal standard — the page states this clearly next to the result. PSNR also has known limits: it scores pixel error, not perceived quality, so it can disagree with the eye. For perceptual work, pair it with SSIM or a learned metric. All maths here runs in your browser; nothing is uploaded.
Worked examples
Frequently asked questions
Sources & references
- scikit-image — peak_signal_noise_ratio (reference implementation)
- MathWorks MATLAB — psnr function documentation
- Peak signal-to-noise ratio — definition and decibel form
The PSNR formula and the MAX = 2bits − 1 convention on this page were last cross-checked against the scikit-image and MATLAB references on 2026-06-20. 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.