Mean time to detect

Also known as: MTTD

On this page 7

Mean time to detect (MTTD) is the average elapsed time between the start of a security incident and the moment the organization first identifies it as a real incident. In incident response and cybersecurity operations, MTTD measures how quickly monitoring, alerting and analysts turn malicious activity into a recognized case, and it is usually reported alongside mean time to respond and mean time to contain.

A short MTTD matters because attacker dwell time drives damage. The longer an intruder operates unnoticed, the more credentials, systems and data the intruder can reach, so detection speed is one of the most direct indicators of defensive maturity that a security operations center can track.

How mean time to detect is calculated

MTTD is calculated by summing the detection intervals of all qualifying incidents in a period and dividing by the number of incidents. Each interval runs from a start timestamp, the earliest evidence of malicious activity, to a detection timestamp, the moment an analyst or automated control confirms that something warrants an incident record.

The start timestamp is often unknown when the incident is opened. It is usually reconstructed afterward through digital forensics, by tracing log entries, endpoint telemetry and network flows back to the first malicious event. As a result, MTTD figures are revised after investigations close, and a dashboard number computed on the day of detection tends to understate the true interval.

The table below lists the timestamps that most incident response teams record and the role each plays in the calculation.

TimestampTypical sourceRole in MTTD
Initial compromiseForensic reconstructionStart of the interval
First malicious event loggedSIEM or endpoint telemetryAlternative start when compromise is unclear
First alert raisedDetection rule or EDRMeasures tooling latency
Incident declaredTicketing or case systemEnd of the interval in most programs
Containment startedResponse recordsStarts the response metrics, not MTTD
Timestamps used in detection metrics

A team must document which timestamps it uses, because choosing the first alert instead of incident declaration as the endpoint can shorten the reported value by hours without any real improvement in defense.

MTTD is one stage in a chain of time-based metrics that together describe the incident lifecycle. Detection measures recognition, while the later metrics measure how fast the organization acts after recognition.

The comparison below shows where MTTD sits relative to the metrics that are most often reported with it.

MetricInterval measuredMain question answered
MTTDCompromise to detectionHow long do threats remain unseen
Mean time to acknowledgeAlert to analyst pickupHow quickly does the queue move
Mean time to respondDetection to first response actionHow fast does the team act
Mean time to containDetection to containmentHow fast is spread stopped
Dwell timeCompromise to evictionHow long did the attacker stay
Comparison of common incident timing metrics

Dwell time and MTTD are often confused. Dwell time usually ends when the attacker is removed during eradication, so it includes detection and response together, whereas MTTD stops at recognition. In practice, MTTD frequently makes up the largest share of total dwell time, especially for stealthy intrusions.

Factors that shorten or lengthen detection

Detection speed depends mainly on telemetry coverage, detection logic quality and analyst capacity. Gaps in any of these three areas allow activity to pass without an alert or cause valid alerts to wait unread in a queue.

The following table summarizes the factors with the greatest effect on MTTD and the typical direction of that effect.

FactorEffect on MTTDPractical lever
Log and endpoint coverageBlind spots lengthen it sharplyOnboard critical assets to the SIEM and EDR
Detection rule qualityPrecise rules shorten itMap rules to MITRE ATT&CK techniques
Alert volume and noiseAlert fatigue lengthens itTune or retire noisy rules
AutomationEnrichment shortens triageUse SOAR for context gathering
Proactive threat huntingFinds quiet intrusions earlierSchedule hypothesis-driven hunts
Staffing modelOff-hours gaps lengthen itProvide continuous coverage or escalation
Drivers of detection speed

Ransomware and commodity malware are often detected within minutes to hours because they are noisy, whereas targeted espionage campaigns can remain hidden for weeks or months. Published industry surveys report median values that range from days to several months, and those figures vary widely with sample, method and sector, so they serve only as rough context.

Using MTTD in a security program

MTTD is most useful as a trend measured consistently over time rather than as a single headline number. Programs typically report it monthly or quarterly, segmented by incident severity level, attack type and detection source.

  • Segment by severity, because a few critical incidents can be hidden by many fast detections of low-impact events.
  • Report the median with the mean, since a single long-running intrusion can distort the average.
  • Record the detection source for each case, such as internal alert, threat hunt, third-party notification or user report.
  • Recalculate after forensics, so the metric reflects the corrected start time rather than the first estimate.
  • Validate with exercises, using tabletop exercises and purple team tests to see whether detection meets the target.

Targets should reflect the threat model. A decision table helps match the target to the environment.

SituationReasonable target focusReason
High-value data and mature SOCHours for critical incidentsRapid exfiltration risk justifies investment
Small team without 24-hour staffingSame business day for high severityCoverage limits make minutes unrealistic
Outsourced managed detectionContractual detection windowsService agreements define accountability
Regulated breach notificationFast confirmation of reportable eventsNotification deadlines start at awareness
Setting detection targets

Limitations and common mistakes

The central limitation is that MTTD only counts incidents that were eventually detected. Intrusions that remain undiscovered never enter the calculation, so a low MTTD can coexist with serious undetected compromise. This survivorship bias means the metric must be read together with coverage and hunting results.

A second problem is metric gaming. When teams are rewarded for low MTTD, they may declare incidents earlier with less evidence, choose convenient start timestamps or exclude difficult cases. Clear written definitions and periodic review of incident records reduce this risk.

Finally, MTTD says nothing about detection quality. A fast detection followed by a slow or ineffective containment still produces a damaging incident, which is why the metric belongs inside a broader incident response plan rather than standing alone.

In plain words

Mean time to detect is the answer to a simple question: how long does a break-in go unnoticed. Imagine a store with cameras and alarms. If a thief slips in on Monday and the staff only notices on Friday, the detection time is four days. Averaged across many incidents, that number shows how alert the store really is.

In computer security, the same idea applies to hackers inside a network. The shorter the time, the less harm an attacker can do, because the defenders can start stopping the attack sooner.

A real-world example

A regional hospital network reviewed its incident records for one year and found an average detection time of 19 days. Most delays came from servers that sent no logs to the central monitoring system and from a single analyst who covered alerts only during business hours.

The security team onboarded the missing servers, added endpoint detection to clinical workstations, retired dozens of noisy rules and arranged overnight escalation through a managed provider. Forensic reconstruction was added to every closed case so that start times were accurate.

Over the next twelve months, the median detection time for high-severity incidents fell to under one day, and a credential theft attempt was caught within four hours of the first malicious login, before the attacker reached patient record systems.