Macaroni Salad can safely sit out at room temperature for up to 2 hours before it starts growing bacteria on it and should be thrown out.
If you leave the macaroni salad out longer than 2 hours then it's likely bad and should be thrown out and discarded to protect your health.
You could get food poisoning from the macaroni salad if it's left out longer than 2 hours.
Always refrigerate any leftover macaroni salad within 2 hours of eating or serving it to make it last longer.
When you refrigerate macaroni salad it should last up to 5 to 7 days before going bad.
If you want to keep the leftover macaroni salad longer than 5 to 7 days you should put it into a freezer safe container and freeze it.
When frozen the macaroni salad should last up to 6 months to a year.