Mark Space Ratio Calculator
In PWM motor control, 555 timer circuits and serial communication, the same question keeps coming up: for how long is the signal high versus low? That proportion is the mark-space ratio, and it decides everything from motor speed to LED brightness to whether a UART receiver stays in sync. This calculator works from whichever number you actually have: the ON and OFF times, a duty cycle percentage, or the signal frequency with your own voltage levels.
Both times must use the same unit.
Waveform sketch: navy is mark (high), white is space (low), scaled to the duty cycle.
Quick Answer
A signal that is high for 4 ms and low for 2 ms has a mark-space ratio of 2.00:1, a duty cycle of 66.7%, a period of 6 ms, a frequency of 166.67 Hz and an average voltage of 3.33 V on 5 V logic. The calculator above is pre-filled with this exact signal in its first mode, and with the matching worked examples in the other two.
Key takeaways
- Ratio and duty cycle describe the same timing two ways: ratio compares ON time to OFF time, duty cycle compares ON time to the whole period. A 2.00:1 ratio and a 66.7% duty cycle are the same signal.
- The first two modes assume 5 V logic for the average voltage, and the result says so. For 3.3 V or any other level, use Frequency analysis mode and enter your own high and low voltages.
- In Duty cycle mode a filled-in period always beats a filled-in frequency. Enter one or the other, not both, unless you mean the period.
- At exactly 100% duty the space time is zero and the printed ratio is a display convention, not a true ratio. The FAQ at the bottom explains what the tool prints there and why.
- Quick Answer
- How to use the mark space ratio calculator
- The four formulas, and how ratio and duty cycle convert
- Worked examples: one per mode, all reproduced in the tool
- Mark-space ratio in a 555 astable circuit
- Where the ratio actually gets used
- What competing calculators miss
- Frequently asked questions
- Add This Calculator to Your Website
- References
How to use the mark space ratio calculator
Pick the mode that matches the number you already have, fill in that panel, and click Calculate. Switching modes hides the previous result, so copy anything you need before you switch.
- Mark-space times: enter the ON (mark) and OFF (space) times in the same unit and pick that unit. You get the ratio, duty cycle, period, frequency and average voltage, plus the waveform sketch scaled to the duty cycle.
- Duty cycle: enter the duty percentage and either the period in ms or the frequency in Hz. If the period field holds a number above zero, the tool uses it and ignores the frequency completely. With the period blank, the period becomes 1000 divided by your frequency.
- Frequency analysis: enter the signal frequency in Hz, the mark duration in ms, and your real high and low voltages. This is the mode for 3.3 V logic, drivers with a low-level offset, and any circuit where the 5 V assumption in the other two modes would give a wrong average voltage.
The three panels are pre-filled with the three worked examples further down this page, so you can reproduce every number in the table before you change a single input.
The four formulas, and how ratio and duty cycle convert
Every output on this page comes from four short formulas. Period is always mark plus space, and everything else is built on that sum.
Period = Mark time + Space time
Duty cycle = (Mark time ÷ Period) × 100
Frequency = 1 ÷ Period, with the period in seconds
Average voltage = (Vhigh × Mark time + Vlow × Space time) ÷ Period
Converting between the two descriptions is the step most pages skip. Duty cycle from a ratio: Duty = Ratio ÷ (Ratio + 1) × 100, so 2:1 gives 2 ÷ 3 × 100 = 66.7%. Going the other way, a duty cycle of d percent is a mark-space ratio of d:(100 − d), so 25% duty is 25:75, which the tool prints as 0.33:1. These definitions match the standard treatment in the University of Plymouth embedded systems glossary entry on PWM, which derives the average voltage the same way: supply voltage multiplied by the mark fraction of the period. Two behaviours of this tool are worth knowing before you rely on it. First, the average voltage in the first two modes is a 5 V logic figure; the words “assumes 5 V logic” in the result are literal. Second, the period shown in Mark-space times mode is the raw sum of your two inputs with no rounding, so 0.1 s and 0.2 s display as a 0.30000000000000004 s period. That is floating-point arithmetic showing itself, not a different answer; the duty cycle and frequency beside it are rounded normally.
Worked examples: one per mode, all reproduced in the tool
Each row below is a separate run of the calculator above with the inputs shown. Change nothing and click Calculate in each mode to see the first three rows appear in turn.
| Mode and inputs | Ratio | Duty | Period | Frequency | Avg. voltage |
|---|---|---|---|---|---|
| Mark-space times: mark 4 ms, space 2 ms | 2.00:1 | 66.7% | 6 ms | 166.67 Hz | 3.33 V |
| Duty cycle: 25%, period 10 ms | 0.33:1 | 25.0% | 10.000 ms | 100.00 Hz | 1.25 V |
| Frequency analysis: 1000 Hz, mark 0.4 ms, 5 V / 0 V | 0.67:1 | 40.0% | 1.000 ms | 1000 Hz | 2.00 V |
| Frequency analysis, servo pulse: 50 Hz, mark 1.5 ms, 5 V / 0 V | 0.08:1 | 7.5% | 20.000 ms | 50 Hz | 0.38 V |
The servo row is the one hobbyists ask about most. A standard servo expects a pulse every 20 ms (50 Hz) with the mark between about 1 ms and 2 ms setting the position; 1.5 ms is the centre. Note how small the duty cycle is: 7.5%. Servo position is encoded in the absolute mark width, not the duty percentage, which is why Frequency analysis mode, where you state the frequency and the mark in milliseconds, is the natural way to check one.
Average voltage on 5 V logic is just the duty cycle wearing a different unit. Read across this chart and the relationship is hard to unsee:
Mark-space ratio in a 555 astable circuit
In the standard 555 astable circuit the mark and space are set by two resistors, and the ratio can never fall below 1:1. That single fact explains most 555 timing surprises.
The capacitor charges through R1 + R2 and discharges through R2 alone, so the high time is 0.693 × (R1 + R2) × C and the low time is 0.693 × R2 × C. The 0.693 and the capacitance cancel in the ratio, leaving mark-space ratio = (R1 + R2) ÷ R2, which is the form given in the Texas Instruments LM555 datasheet. Because R1 adds to the charge path only, the mark is always the longer half: duty cycle stays above 50% in this topology, and getting below 50% needs a diode across R2 or a different topology. If you have resistor values, the ratio takes ten seconds by hand; if you have measured times off an oscilloscope instead, that is exactly the first mode of the calculator above.
Where the ratio actually gets used
The ratio shows up anywhere a rectangular wave carries information or power: PWM drive, servo control, and serial timing are the three everyday cases.
PWM motor and LED control. The load responds to the average voltage, so duty cycle is the control knob and the ratio is the same setting read the other way. A motor controller at 66.7% duty on a 12 V supply delivers about 8 V average; the first two modes here compute that average for 5 V logic, and Frequency analysis mode computes it for your real supply levels. Once you have the average voltage and the load current, the power figures follow from the same arithmetic the amp and watt calculator handles, and feeder sizing for a larger drive is what the kW to amps calculator is for.
Servo positioning. Covered in the worked examples: a 50 Hz frame, a 1 to 2 ms mark, and a duty cycle under 10% that looks wrong until you realise the position lives in the absolute pulse width.
Serial and communications timing. UART frames, infrared remote protocols and pulse-distance encoding all specify mark and space durations directly, because the receiver decodes the gaps as much as the pulses. NEC infrared, for example, tells a 0 from a 1 purely by the space length after an identical mark. Engineers budgeting whether a link closes at all work the same on/off discipline at a larger scale with the link margin calculator.
What competing calculators miss
Search this exact term and the field is thin: most results answer a narrower question than the one you typed.
- BraveCalculator’s mark space ratio page: the only direct namesake rival. Its tool returns the ratio as a single decimal and stops; duty cycle appears in its example text as a hand calculation, not as an output. No frequency, no average voltage, no way to work backward from a duty cycle, nothing for a circuit that is not described by two times alone.
- All About Circuits 555 astable calculator: excellent at its own job, which is a different job: it starts from resistor and capacitor values. If your problem starts with measured times, a target duty cycle, or a frequency, it cannot take your inputs at all.
- Generic duty cycle calculators (AreaCalculators and similar): one formula, pulse width divided by period. They never produce the mark-space ratio, never split a duty cycle back into mark and space times, and never touch average voltage.
- FIRGELLI’s PWM calculator: a strong interactive PWM tool covering period, pulse width and average voltage. It does not report the mark-space ratio itself, and its average voltage is tied to its own supply-voltage framing rather than a general high/low pair you can set per signal.
- The gap this page fills: three entry points (times, duty cycle, frequency) on one page, your own high and low voltages where they matter, a waveform sketch scaled to the result, the ratio-to-duty conversion written out, the 5 V assumption disclosed in the result text itself, and copy and share buttons for handing the numbers to a colleague.
Frequently asked questions
The mark time (signal high) divided by the space time (signal low). A 1:1 ratio means equal on and off times, which is a 50% duty cycle.
They describe the same timing two ways. Mark-space ratio compares on time to off time (mark:space); duty cycle is the on time as a percentage of the whole period.
Duty Cycle = Ratio / (Ratio + 1) x 100. A 2:1 ratio gives 2 / 3 x 100 = 66.7%. Going the other way, a duty cycle of d percent matches a ratio of d:(100-d).
Frequency = 1 / (mark + space) with consistent units. A 4 ms mark and a 2 ms space give a 6 ms period, so 1 / 0.006 s = 166.67 Hz. Keep the units consistent: mixing ms and seconds is the classic error.
The mark-space and duty-cycle tabs assume 5 V logic, the most common case. If your circuit runs at 3.3 V or any other level, use the frequency analysis tab and enter your own high and low voltages.
No. Mark plus space equals the period, so the mark can never exceed one full cycle. The frequency analysis tab flags that mistake with an inline error.
PWM motor speed control, LED dimming, 555 timer astable circuits, servo positioning, switching power supplies, and serial communication protocols like UART, where the receiver must agree on bit timing.
At 100% duty the space time is zero, so a true mark-space ratio would be infinite. The calculator instead prints the mark time followed by:1, for example 10.00:1 for a 10 ms mark on a 10 ms period. Read the duty cycle figure, 100.0%, as the real answer at that extreme.
(R1 + R2) / R2, which is always greater than 1:1, because the capacitor charges through R1 + R2 but discharges through R2 alone. The mark is always the longer half in the standard circuit, so the duty cycle stays above 50%.
Add This Calculator to Your Website
Embed this calculator on your own site with the code below. Pick a size to preview it live, then copy the code.
Powered by Calculator Zilo
References
- Texas Instruments. LM555 Timer Datasheet (astable operation, high and low time equations). Accessed October 22, 2026.
- University of Plymouth, Embedded Systems. Pulse Width Modulation (PWM): Glossary Entry (mark, space, duty cycle and average voltage). Accessed October 22, 2026.
- Arduino. analogWrite(): PWM Output Reference. Accessed October 22, 2026.
- Analog Devices. Glossary: Duty Cycle. Accessed October 22, 2026.
- Electronics Tutorials. Pulse Width Modulation (PWM) Tutorial. Accessed October 22, 2026.
