The locomotion comfort of dairy cows depends on the floor of the walking alleys. Optimal locomotion comfort is given when cows walk on pasture, allowing freedom from discomfort and pain and the expression of normal behavior. This study examined the characteristics of locomotion behavior on pasture (gold standard with optimal locomotion comfort) and compared it with behaviors of cows walking on mastic asphalt or solid rubber mats before and after a routine claw trimming session. Our hypotheses were (1) that gait variables were different on pasture versus mastic asphalt and on mastic asphalt versus rubber, and (2) that claw trimming had an effect on gait variables of cows walking on mastic asphalt. Twenty-four dairy cows kept in a tiestall facility were enrolled in this experimental trial. The pedogram was measured using 2 standalone 3-dimensional accelerometers (400 Hz), attached to the metatarsus of both hind limbs. The extracted pedogram variables included temporal events (kinematic outcome = gait cycle and stance-phase and swing-phase durations) and peaks (kinetic outcome = foot load, toe-off). The cows were further video-recorded to calculate walking speed and stride length. Locomotion score was performed on mastic asphalt to enroll only nonlame cows (locomotion score <3). For comparison between different floor types, repeated-measures ANOVA was performed with the cow as a subject variable, session time of measurement as within-subject variable, and flooring type as a fixed effect. Three separate analyses were performed: pasture versus mastic asphalt (analysis I), solid rubber versus mastic asphalt (analysis II), and the effect of claw trimming on the kinematic and kinetic variables on mastic asphalt (analysis III). All tested gait variables were significantly different between pasture and mastic asphalt floor. The optimal characteristics of locomotion comfort on pasture included shorter duration of gait cycle, longer stance-phase duration, shorter swing-phase duration, higher walking speed, longer stride length, and higher peaks of foot load and toe-off. However, gait variables of cows walking on rubber mats did not show any significant difference compared with the mastic asphalt floor; only stride length tended to be longer on rubber mats. In addition, the stance- and swing-phase durations significantly improved shortly after trimming. The left-right differences of the stance- and swing-phase durations tended to decrease after claw trimming when cows walked on asphalt floor. The results of this study show that solid rubber flooring does not result in significant improvement of the evaluated variables of locomotion comfort compared with mastic asphalt.