Mobile user similarity is significant for location-based social network services. With the pervasiveness of location-acquisition technologies, research on measuring mobile user similarity based on their trajectories has attracted a lot of attention. However, trajectories imply only short-term mobile regularities, and thus users' long-term activity similarity is difficult to be captured. In this paper, we address the problem of mining users' long-term activity similarity based on their trajectories. To solve this problem, we propose a two-stage approach. At the first stage, the notion of routine activity is proposed to capture users' long-term activity regularities. The routine activities of a user are extracted from his/her daily trajectories. At the second stage, user similarity is calculated hierarchically based on the extracted routine activities. Finally, we evaluated our approach based on both real and artificial datasets. The experimental results show that users with different profiles can be discriminated on the basis of our similarity metric, and thus demonstrate the effectiveness of our approach. (C) 2013 Elsevier Inc. All rights reserved.