Excel guide · 4 min read
How to calculate SLA compliance in Excel
=COUNTIF(G2:G11,"Met")/COUNT(D2:D11). Here 5 of 8 resolved tickets met their target: 62.5%.Sample data
Every result on this page was calculated from this sheet by the same spreadsheet engine the Cellwise app uses.
| A | B | C | D | E | F | G | H | I | J | K | L | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | Ticket | Priority | Opened | Resolved | Hours | Target h | Status | Priority | Target h | Setting | ||
| 2 | T-2201 | P2 | Sep 29, 2026 10:05 | Sep 29, 2026 16:40 | 6.58 | 8 | Met | P1 | 4 | As of | ||
| 3 | T-2202 | P1 | Oct 1, 2026 8:20 | Oct 1, 2026 11:05 | 2.75 | 4 | Met | P2 | 8 | Month start | ||
| 4 | T-2203 | P3 | Oct 2, 2026 14:30 | Oct 5, 2026 9:10 | 66.67 | 24 | Missed | P3 | 24 | Compliance goal (yours) | ||
| 5 | T-2204 | P2 | Oct 8, 2026 9:45 | Oct 8, 2026 15:15 | 5.5 | 8 | Met | |||||
| 6 | T-2205 | P1 | Oct 12, 2026 17:50 | Oct 12, 2026 23:30 | 5.67 | 4 | Missed | |||||
| 7 | T-2206 | P3 | Oct 15, 2026 11:00 | Oct 16, 2026 8:45 | 21.75 | 24 | Met | |||||
| 8 | T-2207 | P2 | Oct 21, 2026 13:10 | Oct 22, 2026 10:00 | 20.83 | 8 | Missed | |||||
| 9 | T-2208 | P1 | Oct 28, 2026 9:00 | Oct 28, 2026 10:20 | 1.33 | 4 | Met | |||||
| 10 | T-2209 | P3 | Nov 2, 2026 10:15 | 24 | Breaching | |||||||
| 11 | T-2210 | P1 | Nov 3, 2026 6:30 | 4 | Breaching |
Download this sheet as an Excel practice file (.xlsx)
Hours per ticket and the target from a priority table
Date-times are days in Excel, so resolved minus opened is a fraction of a day. Multiply by 24 for hours: T-2201 took 6.58 hours. Column E wraps it in ROUND(...,2) so the column reads cleanly, and IF(D2="","",...) leaves open tickets blank instead of showing a big negative number.
Don't type the target on every row. Keep a small table of priority and target hours (I1:J4) and look it up with XLOOKUP. When the P2 target changes from 8 hours to 6, you change one cell and every ticket is rechecked. In Excel 2019 or earlier, use =VLOOKUP(B2,$I$2:$J$4,2,FALSE).
Result: 8
8: T-2204 is P2, so its target is 8 hours.
Met, Missed, or breaching while still open
Column G gives each ticket a status. Resolved tickets are Met when the hours are within the target and Missed when they aren't. Open tickets are compared with an "as of" time in M2: if they've already been open longer than their target, they're Breaching, otherwise Open.
Use a typed "as of" date-time rather than NOW(). NOW() changes every time the sheet recalculates, so the report you send at 9:00 doesn't match the one your manager opens at 11:00. A fixed time also makes last week's report reproducible.
Use <= so a ticket that lands exactly on its target counts as Met. Check how your contract words it. "Within 4 hours" usually includes 4:00, but some teams treat it as "under".
Result: Breaching
Breaching: T-2210 is P1 and has been open 5.5 hours against a 4-hour target.
The compliance rate
Count the Met tickets and divide by the tickets that were resolved. COUNT(D2:D11) counts the cells in the Resolved column that have a date-time, so open tickets aren't in the bottom of the fraction.
That's the usual definition, but it means a ticket that sits open forever never counts against you. Show the open breaches next to the rate, =COUNTIF(G2:G11,"Breaching") gives 2 here, or report a stricter rate that adds them to the bottom: 5 of 10 = 50%. Say which one you report.
To compare with a goal, put your target rate in M4 and test it: =IF(COUNTIF(G2:G11,"Met")/COUNT(D2:D11)>=M4,"On target","Below goal") shows Below goal against 90%.
Result: 0.625 shows as 62.5% with Percent format
0.625, which shows as 62.5%: 5 of 8 resolved tickets met their target.
Compliance by priority and by month with COUNTIFS
By priority: count Met tickets for that priority, divided by resolved tickets for that priority. "<>" in COUNTIFS means "not blank", so open tickets are left out. P1 and P2 are both at 66.7% and P3 at 50%.
By month, decide whether a ticket belongs to the month it was opened or the month it was resolved, and stick with it. Resolved-in-month is common for reporting. Put the month start in M3 and use EDATE for the end: =COUNTIFS(G2:G11,"Met",D2:D11,">="&M3,D2:D11,"<"&EDATE(M3,1))/COUNTIFS(D2:D11,">="&M3,D2:D11,"<"&EDATE(M3,1)) gives 4 of 7 for October, 57.1%.
With this few tickets, one miss moves a priority by 33 points. Show the count next to each rate so a bad week on three P1s isn't read as a trend.
Result: 0.5 shows as 50.0% with Percent format
0.5, which shows as 50.0%: 1 of the 2 resolved P3 tickets met 24 hours.
Business-hours SLAs
Many teams run P1 on the clock, 24/7, and P2 and P3 on business hours only. Clock hours make T-2207 look late: opened Wednesday at 13:10, resolved Thursday at 10:00, 20.83 hours against 8. In 9:00-17:00 business hours it took 4.83 hours (3h50 on Wednesday, 1 hour on Thursday) and met its target.
The formula below counts working hours with NETWORKDAYS for the whole days and MEDIAN to clamp the first and last day into 9:00-17:00. It assumes the ticket opens and closes on a working day, so a ticket resolved on a Sunday gives a strange result: check those by hand. The guide on hours between two date-times explains each part and how to add holidays.
Result: 4.8333333333
About 4.83 business hours for T-2207, inside its 8-hour P2 target.
Common mistakes
Including open tickets as Missed or Met
Divide by resolved tickets only (COUNT of the Resolved column), and report open breaches separately.
Using NOW() in a report
NOW() keeps moving. Type an "as of" date-time in a cell and compare open tickets with that.
Forgetting to multiply by 24
Resolved minus opened is in days. 0.27 means about 6.6 hours, not 0.27 hours.
Text dates from the ticket export
If =ISNUMBER(C2) is FALSE, the times are text and the subtraction fails. Convert them with Data > Text to Columns or DATEVALUE plus TIMEVALUE.
FAQ
What is the formula for SLA compliance percentage?
Tickets resolved within target / tickets resolved, formatted as a percentage. In Excel: =COUNTIF(status,"Met")/COUNT(resolved_dates).
How do I calculate hours between two dates and times for an SLA?
=(resolved-opened)*24 gives clock hours. For business hours only, use NETWORKDAYS with MEDIAN to clamp each day to your working hours.
How do I show tickets about to breach?
Add a column for hours left: =F2-($M$2-C2)*24 for open tickets. Sort it smallest first, or use conditional formatting to color anything under 1 hour.
Should I count SLA by month opened or month resolved?
Either works if you're consistent. Month resolved is common because the result is final. Month opened shows how the team handled that month's demand.
Functions used
XLOOKUPModern lookup in any directionIFPicks a result from a testROUNDRounds to digitsCOUNTIFCounts cells that matchCOUNTIFSCounts with several conditionsCOUNTCounts numbersEDATESame day, months laterNETWORKDAYSWeekdays between datesMEDIANMiddle valueMODRemainder after division
Related guides
- Calculate hours between two dates and times in Excel
- COUNTIFS with multiple criteria in Excel
- How to count workdays between two dates in Excel
- How to calculate the percentage of tasks completed in Excel
- Excel formulas cheat sheet: the 25 everyone should know
- How to track expiration dates in Excel
Updated