We tend to associate tail wagging with dogs. Almost everyone has seen happy dogs shaking their tails, and we have jokes and cartoons about it. We even have the phase “wag the dog” to describe when a small or less powerful entity takes control of a bigger or more powerful one. Apart from signaling that they are happy, dogs use their tails to communicate various messages about themselves, but, as it turns out, there are other species of animals besides dogs that use their tails to communicate things, and one of them is cats.
Dogs evolved from wolves (Canis Lupus), which live in packs, so they tend to be social and expressive animals. However, domestic cats are evolved from the African Wildcat (Felix sylvestris lybica), which are solitary nocturnal animals, so the tail signals of cats are different from those of dogs.
When cats curve and swish their whole tail from side to side it may indicate excitement or deep focus as when stalking a prey. This is a common predatory behavior especially if the ears are standing upright. However, a tail moving back and forth can also signal irritation or pain especially when associated with arched backs and lowered heads. When the cat only swishes the tip of its tail, it indicates that they are about to pounce or they are playing, but it can also signal that they are annoyed. If a cat wants to signal it is happy, it will stick its tail straight up, which in dogs is a sign of alertness, not happiness.
In the video below Science Cat demonstrates how cats wag their tails. She is intensely looking at some birds in the bush outside while swishing her tail with her ears upright.