The USDA says that butter is safe at room temperature, but if left out for several days may get a rancid flavor. They recommend leaving butter out for only a day or two.
There's been a buzz lately about this question. Extra Crispy addressed it in this article: "There are some caveats, but, according to some experts, salted butter in an airtight container, like a crock, is perfectly fine to leave out on the counter for up to two weeks."
Is it true? We might not take it that far, but we would definitely say you're safe if it's only been a few hours—or maybe even 24-48 hours. You'll know if it's been spoiled. So the next time you forget to put the butter back, don't toss it out immediately. As someone who originally thought that a butter dish was just made for when you are entertaining guests and want to be fancy—and not to actually store butter on a daily basis—it all suddenly makes so much sense.