Calculate service uptime percentage and allowed downtime budget for an SLA target.
Availability is the fraction of a time period a service was up and functioning, expressed as a percentage. SLAs conventionally describe availability in terms of 'nines' — 99% ('two nines') permits about 3.65 days of downtime per year, while 99.999% ('five nines') permits only about 5.26 minutes per year — because each additional nine reduces allowed downtime by a factor of 10.
Availability percentage
availability = (total_time − downtime) / total_time × 100
99.9% ('three nines') allows about 8.76 hours of downtime per year (0.1% of 8,760 hours) — roughly 43.8 minutes per month.
99.99% ('four nines') allows about 52.6 minutes of downtime per year — an order of magnitude tighter than three nines, which is why each additional nine is significantly more expensive to engineer for.
That depends on the SLA's definition — some exclude scheduled maintenance windows from the downtime count, while stricter SLAs count all unavailability, planned or not. Be explicit about which convention you're using when reporting a number.