Gather all ingredients.
Bring a large pot of lightly salted water to a boil. Cook elbow macaroni in the boiling water, stirring occasionally, until tender yet firm to the bite, about 8 minutes. Rinse under cold water and drain.
Mix mayonnaise, sugar, vinegar, mustard, salt, pepper, and macaroni together in a large bowl.
Stir in celery, onion, green pepper, carrot, and pimentos.
Refrigerate salad for at least 4 hours before serving, but preferably overnight.