The use of individual calving pens in modern farming is widely recognized as a good practice for promoting good animal welfare during parturition. However, determining the optimal time to move a pregnant cow to a calving pen can be a management challenge. Moving cows too early may result in prolonged occupancy of the pen, while moving them too late may increase the risk of calving complications and production-related diseases. In this paper, a simple random walk type Markov Chain Model to predict the optimal time for moving periparturient cows to individual calving pens was proposed. Behavior changes such as lying time, standing time, and rumination time were analyzed using a video monitoring system, and we formulated these changes as the states of a Markov Chain with an absorbing barrier. The model showed that the first time entering an absorbing state was the optimal time for a pregnant cow to be moved to a calving pen. The proposed method was validated through a series of experiments in a real-life dairy farm, showing promising results with high accuracy.