In Discrete Multi-Tone (DMT) modulation systems, the well-known technique to overcome the Inter-Carrier Interference (ICI)/Inter-Symbol Interference (ISI) caused by the inadequate Cyclic Prefix (CP) length is to use a Time-Domain Equalizer (TDE) at the receiver front-end. An algorithm used to calculate the coefficients of the optimal shortening Time Domain Equalizer (TDE) was given by Melsa. However, this algorithm requires that the length of the TDE must be smaller than or equal to the memory length of the target impulse response. This paper modifies this algorithm and makes it not only fit for calculating the coefficients of the TDE with arbitrary length, but also have a much less computational time.