An algorithm for finding tandem repeats in DNA sequences without the need to specify either the pattern or pattern size. TRF uses the method of k-tuple matching to avoid the need for full scale alignment matrix computations. It requires no a priori knowledge of the pattern, pattern size or number of copies. There are no restrictions on the size of the repeats that can be detected. It uses percentage differences between adjacent copies and treats substitutions and indels separately. It determines a consensus pattern for the smallest repetitive unit in the tandem repeat.