From authority nutrition:
Is Butter a Dairy Product?
Dairy Products
Anything made from the milk of mammals is considered to be dairy.
Since butter is made from milk, it’s a dairy product.
Despite this, it is often allowed on dairy-free diets. While this might seem contradictory, there are several explanations.
People who can’t tolerate dairy usually have problems with either the proteins or carbohydrates in milk.
Those with a milk allergy have an allergic reaction to the proteins found in milk, while those who are lactose intolerant cannot digest lactose, the main carbohydrate in milk.
Additionally, some people who have irritable bowel syndrome may do better avoiding lactose (2).
However, unlike most dairy products, butter contains mostly fat and very little protein and carbs. Therefore, people who must follow a lactose-free diet or avoid dairy for other reasons are usually able to eat it without problems (1).
Nevertheless, this is not the case for people who have a milk allergy.
Even though butter contains almost no protein, even trace amounts can cause a reaction. This means it is not safe for people with a milk protein allergy.
Bottom Line: Butter is made from milk, making it a dairy product. However, it’s allowed on some dairy-free diets because it’s low in protein and carbs.