Press Command+Space and type an operation such as 128*3 or 45/5.
The result appears in the search panel.
It also works for common unit conversions.
macOS
Use Spotlight as a quick calculator
Spotlight solves simple calculations without opening another app.