You can do it with many approaches. You have to choose one of them based on criteria like these ones:
- How would you like to provide the formula’s parameters?
- Do you need a formatted output or just a plain number?
- Which approach do you prefer?
- a simple calculator: Logseq already provides this one
- an advanced plugin:
🏛 Full House Templates
- Plugins don’t currently work on mobile.
- a macro:
- with javascript: kits or Code buttons
- with natural language: Synthesis
- Could even try all of them and see which one is more intuitive to you.