Common sub-trajectory clustering is to find similar trajectory segments. Existing clustering methods tend to overlook many of the relevant sub-trajectories; others require a road network as input; all are significantly slowed down considerably by large datasets. This study proposes a novel machine learning approach, called Hypercubes clustering. Hypercubes clustering transforms trajectories into a set of Hypercubes. This study further applies Hypercubes clustering to solving the Estimated Time of Arrival (ETA) problem to show a practical use. ETA, which is used to predict the travel time of a given GPS trajectory, has been extensively used in route planning. Deep learning has been widely applied to ETA prediction. However, prediction tasks involve some challenges, such as small data size, low precision of GPUs, high training loss, and low accuracy. In the training phase, a trajectory model is established using historical trajectories. In the prediction phase, ETA is calculated according to the model. The software of this study for ETA prediction is named HyperETA. The performance of Hypercubes clustering was compared with that of grid clustering (i.e., constant time technique) in terms of memory usage, computational speed and compared with a state-of-art method, TraClus, by assessing their accuracy. The results of HyperETA are compared with a deep-learning-based ETA method, called DeppTTE. The experiment results show that Hypercube clustering can identify common sub-trajectories more swiftly and with less memory usage than grid clustering. The accuracy of Hypercube clustering and HyperETA is superior to TraClus and DeppTTE, respectively. A few problems associated with deep learning are discussed in this study.