← All how-to recipes

How to cap a percentage at 100%

✓ Verified in LibreOffice 25.8.7.3

Progress bars and completion metrics that shouldn't read 137%.

The formula

AppFormulaNotes
Excel=MIN(1,A2/B2)A2=actual, B2=target; format as %. MIN picks the smaller of the ratio and 100%.
Google Sheets=MIN(1,A2/B2)Identical.
LibreOffice Calc=MIN(1,A2/B2)Identical.

How it works

MIN(1, ratio) lets normal progress through untouched and flattens anything past the target to exactly 100%: 137/100 caps at 1. The mirror MAX(0,...) floors negatives, and both together — MAX(0,MIN(1,A2/B2)) — is the standard progress-bar clamp. Cap the DISPLAY only (keep 137% in the data, show 100% in the bar) by clamping in the chart's helper column, not the source.

Verified, not just documented

We ran =MIN(1,A2/B2) in LibreOffice 25.8.7.3 (headless, with forced recalculation) and it returned 1 — exactly the expected result. Every formula here is confirmed by actually executing it.