How to Calculate Uptime (With Formula and Examples)
The uptime formula explained with worked examples. Calculate your website's uptime percentage and see what it means for your business.
The Uptime Formula
The formula for calculating uptime is straightforward:
Uptime % = (Total Time - Downtime) / Total Time x 100
That is it. You take the total time period you are measuring, subtract the time your site was down, divide by the total time, and multiply by 100 to get a percentage.
The result tells you what portion of the measurement period your website was actually available. A 99.9% uptime means your site was reachable and working for 99.9% of the time. The remaining 0.1% is when visitors saw errors, timeouts, or could not connect at all.
This same formula works whether you are measuring availability for a website, an API, a server, or any other system. It is the universal language of reliability. When hosting providers, SLAs, and monitoring tools talk about uptime, they are all using this calculation.
Worked Examples
Let us walk through several examples at different scales to make the formula concrete.
Example 1: Monthly uptime
Your website was down for 2 hours during a 30-day month. There are 720 hours in 30 days.
Uptime = (720 - 2) / 720 x 100 = 99.72%
Your site had 99.72% uptime for the month. That is above the 99.5% threshold most hosting providers guarantee, but below the 99.9% target that revenue-generating sites should aim for.
Example 2: Annual uptime
Over the past year (8,760 hours), your site experienced three outages: one lasting 4 hours, one lasting 1 hour, and one lasting 30 minutes. Total downtime: 5.5 hours.
Uptime = (8,760 - 5.5) / 8,760 x 100 = 99.937%
That is three nines territory — comfortably above 99.9%. For a small business website, this is excellent.
Example 3: Weekly uptime
You had a rough week. Your hosting provider had a major outage that took your site down for 6 hours on Tuesday. There are 168 hours in a week.
Uptime = (168 - 6) / 168 x 100 = 96.43%
One bad day took your weekly uptime below 97%. This illustrates why uptime matters at every scale. Six hours of downtime in a single week can be devastating for an e-commerce business.
Example 4: Working backward from a target
Your hosting provider guarantees 99.95% monthly uptime. How much downtime does that allow?
Rearrange the formula:
Allowed Downtime = Total Time x (1 - Uptime% / 100)
Allowed Downtime = 720 hours x (1 - 0.9995) = 720 x 0.0005 = 0.36 hours = 21.6 minutes
Your provider is promising that your site will not be down for more than about 22 minutes in any given month.
You do not need to run these calculations by hand every time. Our Uptime Calculator lets you enter any uptime percentage and instantly see the allowed downtime per year, month, week, and day. You can also enter downtime hours to see what uptime percentage they represent.
What Counts as Downtime?
This is where the calculation gets nuanced. "Downtime" seems like a simple concept, but different people measure it differently, and those differences matter.
Complete outage
The clearest form of downtime. Your server is unreachable, your site returns a connection error, and visitors see nothing. This always counts as downtime in any reasonable calculation.
Error responses
Your server is technically reachable but returns error codes — 500 Internal Server Error, 502 Bad Gateway, 503 Service Unavailable. The site is "up" in the sense that the server is running, but it is not serving useful content. Most monitoring tools and SLAs count this as downtime, and they should.
Extreme slowness
If your site takes 30 seconds to load, is it "up"? Technically yes, but practically no. Most visitors will leave before the page finishes loading. Some monitoring tools let you define a response time threshold — say, 10 seconds — and count anything slower as downtime. This is sometimes called "functional downtime" or "degraded performance."
Partial outage
Your homepage loads fine, but your checkout page is broken. Or your site works for visitors in North America but is unreachable from Europe. Partial outages are the hardest to measure because the answer depends on which pages or regions you are monitoring. A comprehensive monitoring setup checks multiple pages and locations to catch these situations.
Planned vs unplanned downtime
Here is a distinction that matters for your calculations. Planned downtime — scheduled maintenance windows where you deliberately take the site offline for updates — is generally excluded from uptime calculations and SLA commitments. Unplanned downtime — unexpected outages caused by failures — is what counts.
This distinction is important when reading your hosting provider's SLA. If they schedule 4 hours of maintenance per month and exclude it from their uptime calculation, their "99.9% uptime" really means 99.9% of the remaining 716 hours, not the full 720. That is still about 43 minutes of unplanned downtime, but the planned maintenance is on top of that.
Always read how your hosting provider defines "downtime" in their SLA. Some providers only count complete outages lasting more than 5 minutes. Others exclude maintenance windows, "force majeure" events, or outages caused by DDoS attacks. The fine print determines whether that 99.9% guarantee is meaningful or hollow.
How Monitoring Tools Calculate Uptime
When you use an uptime monitoring tool, the tool does not watch your site continuously like a video camera. It takes samples. It checks your site at regular intervals — every minute, every 5 minutes, every 15 minutes — and each check produces a binary result: up or down.
The tool then calculates uptime based on the ratio of successful checks to total checks:
Uptime % = Successful Checks / Total Checks x 100
If a tool runs 1,440 checks in a day (once per minute) and 1,437 come back successful, your uptime for that day is:
1,437 / 1,440 x 100 = 99.79%
Those 3 failed checks represent 3 minutes of detected downtime. But the actual downtime might have been slightly more or less than 3 minutes. The site might have gone down 30 seconds after a successful check and come back up 30 seconds before the next one, meaning the real outage was nearly 2 minutes but only one check caught it.
This is why check frequency matters for accuracy. More frequent checks mean the sampling error is smaller and your uptime percentage more closely reflects reality. A tool that checks every 15 minutes can miss entire outages that a 1-minute tool would catch.
Converting Between Uptime and Downtime
One of the most practical skills is being able to quickly convert an uptime percentage into real-world downtime. Here is a reference table for common uptime levels:
| Uptime % | Downtime per Year | Downtime per Month | Downtime per Day |
|---|---|---|---|
| 99% | 3 days 15 hours | 7 hours 18 min | 14 min 24 sec |
| 99.5% | 1 day 19 hours | 3 hours 39 min | 7 min 12 sec |
| 99.9% | 8 hours 46 min | 43 min 50 sec | 1 min 26 sec |
| 99.95% | 4 hours 23 min | 21 min 55 sec | 43 sec |
| 99.99% | 52 min 36 sec | 4 min 23 sec | 8.6 sec |
| 99.999% | 5 min 16 sec | 26 sec | 0.86 sec |
The jump from 99% to 99.9% eliminates nearly 3 days of annual downtime. The jump from 99.9% to 99.99% saves about 8 hours per year. Each additional "nine" provides diminishing returns in absolute time saved, but for businesses where every minute counts, those hours matter.
For a quick mental shortcut, remember that 99.9% uptime allows roughly 8 hours and 45 minutes of downtime per year, or about 44 minutes per month. That is the benchmark most small businesses should use when evaluating hosting providers and SLAs.
Calculate your uptime instantly
Use our free Uptime Calculator to convert any percentage to real downtime — or enter your downtime to see the percentage.
Uptime Over Different Time Periods
The time period you choose for measurement affects both the number and its usefulness.
Daily uptime is volatile. A single 15-minute outage drops your daily uptime to 98.96%. One bad day does not mean your infrastructure is falling apart. Daily numbers are useful for spotting incidents but not for evaluating overall reliability.
Weekly uptime smooths out daily spikes. A 15-minute outage in a week gives you 99.85% uptime — still a noticeable dip but more representative of actual reliability.
Monthly uptime is the most common measurement period and the standard for most SLAs. It gives you enough data to be meaningful without being so long that individual incidents get lost in the average.
Annual uptime is the most stable measure and the most useful for long-term planning. It captures seasonal patterns, the cumulative impact of multiple small incidents, and the overall reliability trend of your infrastructure.
Most monitoring tools let you view uptime across all these time periods. The monthly view is best for holding hosting providers accountable against their SLA. The annual view is best for understanding your overall reliability posture and whether it is improving over time.
Common Calculation Mistakes
A few pitfalls to watch out for when calculating or interpreting uptime numbers.
Mixing time units. Make sure your total time and downtime are in the same units before dividing. Mixing hours and minutes is a common source of errors. Convert everything to minutes or everything to hours first.
Ignoring partial outages. If your checkout page was broken for 3 hours but your homepage was fine, what is your uptime? The answer depends on what you measure. If you only monitor your homepage, your uptime looks great. If you monitor critical user flows, the picture is very different. Always monitor the pages that matter most to your business.
Using the wrong time period. Comparing 99.9% monthly uptime to a 99.99% annual target is apples and oranges. Make sure you are comparing like with like.
Forgetting about maintenance exclusions. If your hosting provider excludes scheduled maintenance from their uptime calculation, factor that in when comparing their promise to your actual experience. Your customers do not care whether the outage was "planned." They just know the site did not work.
Key Takeaways
- The uptime formula is (Total Time - Downtime) / Total Time x 100.
- What counts as "downtime" matters — read the fine print on SLAs to understand what is excluded.
- Monitoring tools calculate uptime by sampling, so check frequency affects accuracy.
- 99.9% uptime allows about 43 minutes of downtime per month — the standard target for most small businesses.
- Use the Uptime Calculator to quickly convert between percentages and real-world downtime.
- Measure over consistent time periods and be aware of common mistakes like mixing time units or ignoring partial outages.
Part of Boring Tools — boring tools for boring jobs.
Know the moment your site goes down
Monitor your websites with checks every minute from multiple locations.