Automated tracking of indoor housed farm animals is gaining an increasing interest in farming practice and research for monitoring animal behaviour and health. Several positioning solutions have become commercially available for different animal species, but the insight on how these systems perform in pig facilities is still limited. In this study the feasibility of tracking sows in a barn using an ultra-wideband (UWB) based indoor positioning system was investigated. The system consisted of 7 base stations and multiple tracker tags, and the determination of tags' positions was based on time of arrival (ToA). For locating stationary tags the system achieved 0.37 m accuracy at 1 m height and 0.50 m accuracy at 0.3 m height. While tracking moving tags at 1 m height 0.38 m accuracy was achieved. Three filters were tested to further improve the positioning performance. The median filter had the highest improvement on locating stationary and moving tags. The bilateral filter had a balanced capability of uncovering complex moving trajectories. The double exponential moving average filter was more suited when real-time updates were required. The overall results showed that tracking group housed sows inside a pig barn was feasible using the UWB positioning system. • A UWB positioning system achieved <0.5 m positioning accuracy using in a sow barn. • The positioning accuracy was dependent on the location and height of tracker tags. • Filters were more effective for improving tracking precision than accuracy. • The choice of filters depends on the motion characteristics and the application.