Here are a few articles that help to crack the dress code. "Formal" isn't the most formal option and throwing "cocktail" in gives you the chance to have a little more fun with your look!
https://www.theknot.com/content/wedding-guest-attire-cheat-sheet
https://www.brides.com/story/wedding-dress-code-explained#toc-formal-or-black-tie-optional
https://www.nordstrom.com/browse/content/blog/wedding-dress-codes