DIGITAL QUANTITY WORKSHEETS

Removing overlapping downtime before calculating availability

When two incidents overlap, the seconds they share were down only once. This worksheet shows how to take the union of the intervals before computing availability.

Summed durations count shared time twice

Incident reports list durations, and it is tempting to add them to get the total downtime. That works only when the incidents do not overlap. If two incidents affected the same service at the same time, the overlapping seconds appear in both durations, and a plain sum counts them twice. For a time-based availability figure the question is how many distinct seconds the service was down, so the right quantity is the length of the union of the intervals. This page works one example by hand and then hands the corrected downtime to the Uptime Calculator.

The 60 and 50 second incidents

Suppose the first incident lasted 60 seconds and the second lasted 50, and they overlapped for 20 seconds. As timestamps: the first ran from 10:00:00 to 10:01:00 and the second from 10:00:40 to 10:01:30. The sum of durations is 60 + 50 = 110. The overlap is the stretch from 10:00:40 to 10:01:00, which is 20 seconds. The union runs from 10:00:00 to 10:01:30, so it is 90 seconds, and 110 - 20 = 90 gives the same result. The Basic calculator handles both steps: add the durations, then subtract the overlap.

Availability from the union

Take an observation window of 1,000 seconds. With 90 seconds of distinct downtime, up time is 910 seconds and availability is 100 × 910 / 1,000 = 91 percent. If the summed durations of 110 seconds were used instead, up time would be 890 seconds and availability 89 percent. The two-point gap comes entirely from counting 20 shared seconds twice. In reports that are tied to a service-level target, a difference of that size can decide whether a threshold was met, which is why the union matters and why the method should be documented.

Three overlapping incidents

Inclusion and exclusion extend to more intervals. Take three incidents of 30 seconds each: the first from 0 to 30, the second from 20 to 50, and the third from 40 to 70, in seconds from the start of the window. The sum of durations is 90. The first and second overlap by 10 seconds, the second and third by 10, and the first and third not at all. The union is 90 - 10 - 10 = 70 seconds, the span from 0 to 70. In a 3,600-second window that gives up time of 3,530 seconds and availability of about 98.06 percent. With more incidents it is easier to sort them by start time and merge them. Notice that the first and third incidents do not touch, yet they are linked through the second, so the merged interval is one continuous 70-second block. If the third incident had started at 55 seconds instead, a gap of 5 seconds would separate it from the second, and the union would be 50 + 30 = 80 seconds because the gap is not down time. Gaps matter as much as overlaps when merging. Check the endpoints too: an incident that ends at the exact second the next begins leaves no gap, and the union simply adds the two lengths.

One incident inside another

Containment is a special case of overlap. If a 120-second incident includes a 30-second incident fully inside it, the overlap is 30 seconds, and the union equals 120 + 30 - 30 = 120 seconds, the length of the longer one. The shorter incident adds no new down time. Nested incidents often come from monitoring systems that raise one alert for a whole outage and others for individual components of the same outage. The question to ask is whether the service as defined was down, not how many alerts fired. In a 3,600-second window, 120 seconds of downtime gives availability of about 96.67 percent, and the contained alert changes nothing. Counting both durations would give 150 seconds and 95.83 percent, a spurious drop of nearly a point from an alert that added no new down time. Alert counts and incident counts are different quantities from down seconds, and only down seconds enter the availability ratio.

Merging intervals from a log

With many incidents, the usual procedure is to sort them by start time and sweep through. Keep a current interval. If the next incident starts before the current one ends, extend the current end to the later of the two ends. If it starts after, close the current interval and start a new one. The sum of the lengths of the merged intervals is the downtime. A spreadsheet can do this with helper columns, and a short script can do it for large logs. The calculator on this site does not merge intervals, since it takes a single downtime total.

Defining the service and its down state

A union is only meaningful for one stated service and one definition of down. An incident that affected only one region or one customer group may count differently from a full outage, and a degraded period with slow responses may or may not count at all. Some agreements exclude scheduled maintenance, and others count it. If different incidents hit different populations, you may need separate availability figures or a weighting rule, not a single union. Write the definition next to the figure so that readers understand which seconds were counted.

The observation window is the denominator

Availability divides up time by the entire observation window, including the hours when nobody used the service, unless the definition says otherwise. In the example the denominator is 1,000 seconds, whatever happened inside it. Changing the window changes the answer: the same 90 seconds in a 3,600-second window gives 97.5 percent, and in a window of 86,400 seconds (one day) gives about 99.9 percent. Choose the window to match the reporting period, and do not shorten it to the part of the day when problems happened.

What this page does and does not compute

The calculator accepts one downtime total and a window and returns up time and availability. It cannot read incident logs, detect overlaps or decide which events count. Those steps happen before you enter the number. Rounding is the last consideration, and it matters more near the top of the scale. Availability near 100 percent changes little with a few seconds, so report the downtime in seconds alongside the percentage and keep the unrounded figure for any later pooling with other windows.

Reproduce the checks

Summed incident durations

Open the Basic calculator and enter:

First number
60
Operation
add
Second number
50

Expected output:

Result

110

The overlap is counted twice in the simple sum.

Distinct down seconds

Open the Basic calculator and enter:

First number
110
Operation
subtract
Second number
20

Expected output:

Result

90

Remove the common interval once.

Availability from the union

Open the Uptime Calculator and enter:

Observation window
1000
Downtime
90

Expected output:

Uptime

91

Uptime duration

910

The denominator is the full observation window.

References and implementation scope

The examples describe the behavior of the linked Computandum tools. A successful local check does not establish that another application accepts the same format or applies the same limits.

Sources

Related tasks