The Contrast Percentage Calculator computes contrast percentage from fringe maxima and minima, quantifying visibility in interference and diffraction experiments.
Report an issue
Spotted a wrong result, broken field, or typo? Tell us below and we’ll fix it fast.
About the Contrast Percentage Calculator
This calculator estimates contrast as a percentage using two common physics definitions: Michelson and Weber. Pick Michelson for periodic patterns or when you have a clear maximum and minimum luminance. Pick Weber for a small target on a larger, uniform background. The tool guides you to the correct path so your result matches your measurement context.
Enter luminance in physical units, or enter digital values when physical readings are not available. If you use pixel values, the calculator can apply a simple gamma linearization to approximate luminance. It also reports sign where relevant for Weber contrast, so you can tell bright-on-dark from dark-on-bright. You can add notes about units and measurement conditions for repeatable experiments.
The calculator emphasizes transparent derivation. It reveals which equation it used and how the inputs map to that equation. That clarity helps peer review, lab logs, and design decisions. It also helps you compare results across projects without confusion.

Equations Used by the Contrast Percentage Calculator
Contrast percentage can mean different things depending on the pattern you measure. The calculator supports both standard forms and explains which suits your case. Here are the equations it uses and how they relate to your inputs.
- Michelson Contrast (periodic patterns): C_M = ((I_max − I_min) / (I_max + I_min)) × 100%
- Weber Contrast (small target on uniform background): C_W = ((I_target − I_background) / I_background) × 100%
- Sinusoidal or grating modulation: For peaks and troughs, percent modulation equals the Michelson contrast percentage.
- Percentage and ratio conversion: percentage = ratio × 100; ratio = percentage / 100.
- From digital color to luminance (simplified sRGB): L ≈ 0.2126 R_lin + 0.7152 G_lin + 0.0722 B_lin, where V_lin ≈ (V/255)^2.2 for each channel.
Michelson contrast stays within 0% to 100% for real, nonnegative luminances. Weber contrast can exceed 100% when the target is more than twice the background luminance. The sign of Weber contrast indicates whether the target is brighter (positive) or darker (negative) than the background. Always keep track of units to avoid mixing digital code values with physical luminance.
How to Use Contrast Percentage (Step by Step)
Match the equation to your visual pattern and measurement method. If you are comparing two extremes, use Michelson. If you are testing detectability of a small stimulus on a uniform field, use Weber. Then measure or estimate relevant luminances and compute the percentage.
- Identify your use case: periodic pattern or small target on uniform background.
- Measure luminances with a photometer, or estimate from calibrated image data.
- Select the equation that aligns with your pattern geometry.
- Compute the contrast percentage and record the result and units.
- Interpret the value against visibility thresholds, lab specs, or display standards.
Do not mix readings from different instruments without calibration. If using image pixels, convert to linear light before derivation to avoid bias. Document ambient light and viewing geometry to support repeatable testing.
Inputs and Assumptions for Contrast Percentage
The calculator accepts physical luminance or linearized pixel data and applies the proper derivation. Choose the input set that matches your instruments and the scene. Stay consistent about units and geometry.
- I_max and I_min for Michelson contrast, measured in cd/m^2.
- I_target and I_background for Weber contrast, also in cd/m^2.
- Measurement mode: Michelson or Weber, selected by the user.
- Optional digital inputs: sRGB pixel values, with gamma linearization enabled.
- Notes on ambient illumination and screen reflectance, if relevant.
Background luminance must be greater than zero for Weber contrast. The calculator flags divisions by zero and negative luminances. Extreme outliers often indicate meter saturation, glare, or mis-aimed sensors. Re-check the setup if your result seems implausible.
How to Use the Contrast Percentage Calculator (Steps)
Here’s a concise overview before we dive into the key points:
- Choose Michelson or Weber mode based on your pattern.
- Enter luminance values, or enter digital values and enable linearization if needed.
- Select the units for physical measurements and confirm calibration.
- Optionally add ambient light and notes for traceability.
- Run the calculation to generate the contrast percentage.
- Review the result, sign (Weber), and derivation details shown.
These points provide quick orientation—use them alongside the full explanations in this page.
Case Studies
A lab evaluates display uniformity on a monitor’s white field. Measurements yield I_max = 320 cd/m^2 and I_min = 280 cd/m^2. Using Michelson: C_M = (320 − 280) / (320 + 280) × 100% = 40 / 600 × 100% ≈ 6.67%. The result shows modest luminance variation across the field, typical for a quality office display. What this means: Uniformity is acceptable for general use, with minor edge falloff.
A signage engineer tests legibility of a bright symbol on a gray background. The background reads 10 cd/m^2 and the symbol reads 12 cd/m^2. Using Weber: C_W = (12 − 10) / 10 × 100% = 0.2 × 100% = 20%. The result exceeds common photopic detection thresholds, indicating comfortable visibility at normal viewing. What this means: The symbol will stand out well in typical indoor lighting.
Assumptions, Caveats & Edge Cases
Contrast depends on more than numbers. Viewing angle, ambient light, glare, and observer adaptation all shift perceived visibility. The calculator returns a physics-based estimate in percentage, but you should still consider human factors and measurement uncertainty.
- Weber contrast requires a strictly uniform background and nonzero background luminance.
- Gamma-coded pixel values must be linearized before use, or results will be biased low.
- Stray light, reflections, or veiling glare reduce effective contrast in situ.
- Spectral mismatch between meter and source can skew luminance readings.
- Noise and flicker complicate “instant” readings; average multiple samples when possible.
When in doubt, re-measure and compare repeat runs. If two methods disagree, inspect assumptions and units. Align the equation to the spatial layout of your target and background. Consistency yields trustworthy trends over time.
Units & Conversions
Using consistent units protects your derivation and prevents misread results. Luminance is typically measured in cd/m^2 (also called “nits”). Displays, print media, and lab scenes often mix units, so convert before calculating contrast.
| Quantity | Common units | Conversion or note |
|---|---|---|
| Luminance | cd/m^2 (nit) | 1 nit = 1 cd/m^2 |
| Foot-lambert | fL | 1 fL ≈ 3.426 cd/m^2 |
| Illuminance to luminance | lx to cd/m^2 | For Lambertian surfaces: L ≈ E × ρ / π, where E is in lx and ρ is reflectance |
| Contrast ratio vs percentage | ratio ↔ % | percentage = ratio × 100; ratio = percentage / 100 |
| Digital to linear light | RGB (code) to linear | Approximate linearization: V_lin ≈ (V/255)^2.2 for sRGB |
Use the table before you enter values. Convert everything to the same form first. If you do not know reflectance or gamma, estimate conservatively and document the assumption. That record helps you compare later results.
Troubleshooting
If your numbers look odd, check the basics. Mixed units, unlinearized pixels, or a zero background can produce invalid outputs. The following quick checks solve most issues fast.
- Confirm that background luminance is not zero for Weber contrast.
- Verify all luminances are in cd/m^2 before calculation.
- Linearize any sRGB values before deriving contrast.
- Repeat measurements to rule out meter noise or glare.
If a result exceeds expectations, inspect the scene for reflections or backlight breathing. For repeating patterns, ensure your I_max and I_min are measured at true peaks and troughs. Switch equations if your pattern type was misidentified.
FAQ about Contrast Percentage Calculator
When should I use Michelson instead of Weber?
Use Michelson when you have clear maxima and minima, such as sinusoidal gratings or alternating bars. Use Weber for a small or localized target on a uniform background.
Why does Weber contrast sometimes exceed 100%?
Weber contrast compares the increment to background. If the target is more than twice the background luminance, the increment exceeds the background, giving more than 100%.
Can I use pixel values if I do not have a photometer?
Yes, but linearize the pixel values to approximate luminance. For sRGB, apply a gamma of about 2.2, then compute contrast.
Does the sign of Weber contrast matter?
Yes. A positive sign means the target is brighter than the background. A negative sign means the target is darker, which is common in dark text on light backgrounds.
Glossary for Contrast Percentage
Luminance
Light emitted or reflected in a given direction per unit area, measured in cd/m^2. It governs brightness perception under fixed adaptation.
Illuminance
Light incident on a surface, measured in lx. You can estimate luminance from illuminance with reflectance and a Lambertian assumption.
Michelson Contrast
A contrast definition for periodic or symmetric patterns using I_max and I_min. It yields 0% to 100% for nonnegative luminances.
Weber Contrast
A contrast definition for a small target on a uniform background. It can be positive or negative and may exceed 100% in extreme cases.
Gamma (Display Gamma)
A nonlinear mapping between code values and luminance. Linearize code values before derivation to avoid biased contrast results.
Reflectance
The fraction of incident light a surface reflects. It helps convert illuminance to luminance using L ≈ E × ρ / π.
Veiling Glare
Stray light that overlays the image, reducing perceived and measured contrast. Control it with baffles and matte surrounds.
Spatial Frequency
The number of cycles per degree or per millimeter in a periodic pattern. Contrast sensitivity depends strongly on spatial frequency.
References
Here’s a concise overview before we dive into the key points:
- Michelson contrast definition and examples
- Contrast in vision: Weber contrast, visibility, and context
- Poynton’s Gamma FAQ: Linearization and display transfer functions
- CIE International Lighting Vocabulary (definitions for luminance and illuminance)
- W3C WCAG 2.1 Contrast (for comparison with ratio-based accessibility)
- Optics paper on display measurements and luminance (OSA Applied Optics)
These points provide quick orientation—use them alongside the full explanations in this page.