Skip to contentScholarGate
LibraryBookshelfDeskReview StudioAssistant
Sign in
On this page
IntuitionHow it worksWhen to use itStrengths & limitationsCommon pitfallsApplicationsFrequently asked🔒 Read the full methodSourcesRelated methods
Cite this pageSpotted an issue on this page? Report or suggest a fix →
Home›Decision-making›Dynamic Time Warping
MCDMTime-series distance

Dynamic Time Warping

Dynamic Time Warping Distance · Also known as: DTW, dynamic programming time warping, elastic distance

Dynamic Time Warping is a distance metric for comparing time series or sequential data that may vary in length or speed. Introduced by Hideki Sakoe and Seibi Chiba in 1978 for speech recognition, DTW measures the minimal cumulative distance needed to align two sequences using dynamic programming. Unlike fixed-distance metrics, DTW allows flexible time warping, making it ideal for sequences that are similar in shape but offset or scaled differently in time.

ScholarGate
  1. MCDM
  2. v1
  3. 2 Sources
  4. PUBLISHED
Cite this page →
Tools & resources
Download slides
Learn & explore

Read the full method

Members only

Sign in with a free account to read this section.

Sign in

Method map

The neighbourhood of related methods — select a node to explore.

Dynamic Time Warping
Levenshtein DistanceDTW Barycenter Averaging

When to use it

DTW is ideal for comparing time series of different lengths, comparing sequences with similar patterns but different speeds (speech, motion, sensor data), and any domain where flexible temporal alignment matters. Use it when you care about shape similarity rather than point-by-point temporal alignment. It is computationally more expensive than Euclidean distance, so consider faster variants (FastDTW, LB-DTW) for large datasets.

Strengths & limitations

Strengths
  • Handles sequences of different lengths natively
  • Robust to time warping and speed variations; identifies shape similarity
  • Captures intuitive similarity: sequences with same shape but different timing appear similar
  • Well-established in time-series clustering and classification
Limitations
  • Computationally expensive: O(n*m) time and space for sequences of length n and m
  • No triangle inequality; not a true metric in the mathematical sense
  • Sensitive to outliers and noise in the time series
  • Requires careful parameter tuning (window constraints, normalization) for best results

Frequently asked

Why is DTW better than Euclidean distance for time series?

Euclidean distance compares points at the same time index, penalizing time shifts. DTW allows flexible alignment, finding the best time-matched path. If sequences have the same shape but different timing, DTW recognizes similarity while Euclidean distance treats them as dissimilar.

Is DTW symmetric?

Yes, DTW(A,B) = DTW(B,A) in the standard definition. However, the alignment path may differ due to the direction of backtracking. DTW is symmetric but not a true metric because it does not satisfy the triangle inequality.

How do I handle sequences of very different lengths?

DTW handles length differences naturally. However, very large length differences can lead to trivial alignments (many-to-one mappings). Constrain the warping window (Sakoe-Chiba band) to enforce local alignment and prevent excessive distortion.

What is FastDTW and when should I use it?

FastDTW is a faster approximation of DTW with O(n*m) time complexity but lower space overhead and practical speedup through coarse-to-fine refinement. Use FastDTW when comparing many sequences or working with long sequences where standard DTW is too slow.

Sources

  1. Sakoe, H., & Chiba, S. (1978). Dynamic programming algorithm optimization for spoken word recognition. IEEE Transactions on Acoustics, Speech, and Signal Processing, 26(1), 43-49. DOI: 10.1109/TASSP.1978.1163055 ↗
  2. Salvador, S., & Chan, P. (2007). FastDTW: Toward accurate dynamic time warping in linear time and space. KDD Explorations, 5(1), 70-86. link ↗

How to cite this page

ScholarGate. (2026, June 3). Dynamic Time Warping Distance. ScholarGate. https://scholargate.app/en/decision-making/dynamic-time-warping

Related methods

Levenshtein Distance

Which method?

Set this method beside its closest kin and read them side by side — the library lays the books on the table; the choice is yours.

  • Levenshtein DistanceDecision-making↔ compare
Compare side by side →

Referenced by

DTW Barycenter AveragingLevenshtein Distance

Similar methods

DTW Gait AnalysisDTW Barycenter AveragingLevenshtein DistanceDynamic ProgrammingGower DistanceDiscrete Wavelet TransformOptimal Matching AnalysisCosine Distance

Related reference concepts

Sequence Alignment AlgorithmsDynamic ProgrammingMultidimensional ScalingString AlgorithmsK-Means ClusteringHidden Markov Models

Spotted an issue on this page? Report or suggest a fix →

ScholarGate — Dynamic Time Warping (Dynamic Time Warping Distance). Retrieved 2026-07-21 from https://scholargate.app/en/decision-making/dynamic-time-warping · Dataset: https://doi.org/10.5281/zenodo.20539026
Quick facts
Originator
Hideki Sakoe and Seibi Chiba
Subfamily
Time-series distance
Year
1978
Type
Elastic sequence alignment metric
Related methods
Levenshtein Distance
ScholarGate

A content-first reference library for research methods — what each one is, how it works, and where it comes from.

Open data (CC-BY)

Explore

  • Library
  • Search the library…
  • Browse by field
  • Fields
  • Journey
  • Compare
  • Which method?

Reference

  • Subjects
  • Atlas
  • Glossary
  • Methodology
  • Philosophy

Your tools

  • Bookshelf
  • Desk
  • Chat

Company

  • About
  • Pricing
  • Contact
  • Suggest a method

Entries are compiled from published sources for reference. Verifying the accuracy and suitability of any information for your own use remains your responsibility.

© 2026 ScholarGate · A research-method reference library
  • Privacy
  • Cookies
  • Terms
  • Delete account