The article concerns the influence of the location of livestock building in relation to the cardinal points and the absorption of solar energy, especially in periods of low and high external temperatures. The starting point was the spatial variation in the distribution of solar radiation in Poland. The methodology of determining heat gains from solar radiation in accordance with PN-EN 13790 standard was applied. The calculations were made for a theoretical pigsty building, for four orientations: the N–S, W–E, NW–SE and NE–SW. Theoretical locations of the building were assumed in three climate zones of Poland: zone II represented by city of Poznań, zone III (Warsaw and Jelenia Góra) and zone IV (Białystok). The obtained results do not entirely confirm the accuracy of the commonly applied principle of N–S building orientation. However, during April–September period this location is indeed favourable in case of some climate zones in Poland (zones II and IV). In periods of lower temperatures the most optimal is W–E orientation (zones II, III and IV) and NW–SE for zone II.