How can I add a custom caclulation form in post?

If you’re using the block editor, then you could create a custom block to contain the calculation form. Optionally you could register a custom shortcode to print out the form. Afterwards you would be able to display the form on any post / page by using the block or shortcode depending on which one you chose to write.

In both cases you probably want to create a custom plugin to host all the code you write.