Monitoring the movement patterns of dairy cattle can provide important insight into space utilization or space occupancy in a barn. Although several precision livestock technologies have been developed to record dairy cattle movements, there is a lack of open source tools to track and visualize cattle movement patterns. Therefore, we developed an open-source computer vision software tool, AnimalMotionViz, that allows users to track and visualize dairy cattle movement patterns using a motion heatmap. The software comes with an easy-to-use web-based graphical user interface built with the Python Dash package. It implements a set of background subtraction algorithms in the OpenCV package to track animal motion patterns in real time. The software processes each frame of the input video and identifies the background and foreground using these algorithms. Foreground objects are then subtracted from the background across all frames and cumulatively overlaid on an empty mask image created with the first frame of the input video to visualize the intensity or frequency of motion across different regions. The user can generate motion heatmaps in an image and video, and also track specific regional motion with a custom mask. The software also returns the top three peak intensity locations, the total percentage of regions used, and the within-quadrant percentage of regions used. In four 5 min sample videos, quadrants with peak intensity of space use, as identified using the software, aligned with quadrants where calves spent the greatest duration of time, according to continuous recording of behavior from video. The motion heatmaps generated by AnimalMotionViz can be used to understand space utilization or space occupation by animals, as well as to assess how space allocation affects dairy cow movement. We conclude that the newly developed AnimalMotionViz is a user-friendly and efficient tool to support research developments in precision livestock farming towards enhancing cattle management practices and improving pen designs.