Bring a large pot of lightly salted water to a boil. Cook the elbow macaroni in the boiling water, stirring occasionally, until tender yet firm to the bite, about 8 minutes. Rinse under cold water and drain.
In a large bowl, mix the mayonnaise, sugar, vinegar, mustard, salt, and pepper until well combined.
Add the cooked and drained macaroni to the bowl with the dressing. Stir to coat the macaroni evenly.
Stir in the chopped celery, onion, green bell pepper, grated carrot (if using), and chopped pimento peppers (if using).
Cover the bowl and refrigerate the salad for at least 4 hours before serving, but preferably overnight. This allows the flavors to meld together.
Give the salad a good stir before serving. Enjoy!