PWM Duty Cycle Calculator

Convert between duty cycle percentage and the compare register value (CCR) for a given ARR.

Ad slot

How this works

Duty cycle % = CCR / (ARR+1) × 100, using the common convention where the timer period corresponds to ARR+1 counts. Some peripherals define this slightly differently (ARR vs ARR+1, or active-low outputs) — verify against your specific timer's reference manual if the result seems off by a small amount.

← All EmbedCalc tools