In the fridge, a tightly wrapped herb compound butter will stay good for about 5-7 days. In the freezer, wrapped tightly, it can stay good up to 6 months! Plain butter has a much longer shelf life, since it hasn't been mixed with fresh herbs or garlic that shorten that "best by" date. This is the same for if you're using homemade butter as the base for your herb compound butter, as long as you rinsed it well before adding the herbs and garlic. If you're going this route, I recommend making it no more than a day or two before you plan to use it, just to be safe. Wrap tightly and freeze whatever is left as soon as you're done.