Yes, butter and margarine can generally be used as a 1:1 substitute for coconut oil in most recipes. However, keep in mind that the flavour profile may change slightly, and the health benefits will differ. Butter has a rich flavour that works well in many baked goods, but it contains more saturated fat. Margarine varies in healthiness depending on the type you choose, with some varieties containing trans fats, which are considered unhealthy.