Cognito Forms supports calculations for many of the settings you can configure. Also, any time you are able to enter calculations, you are also able to just enter a literal/constant value.
Any option that supports calculations will have an = sign as a placeholder and a lightning bolt at the end, like the following:
You can click the lightning bolt to bring up the advanced editor, but you can also just enter your calculations right there.
If all you want is to provide a constant value, you can do so like this:
But if you want to write a calculation, you must start with an = sign (similar to Excel) to let Cognito Forms know you are trying to calculate something:
I suspect in your case you just need to add an = sign at the front of your calculation.
If you are trying to calculate totals by adding the amounts for selections made for Choice fields (dropdown, radio buttons, or checkboxes) or for Yes/No fields (checkbox), you can use the specific FieldName_Amount property in your calculations. For example, if you have a Choice field named Model with assigned prices, and another Choice field named Wheel Package with assigned prices, you could calculate the total of these two fields with this calculation:
=Model_Amount + WheelPackage_Amount.
Finally, any field marked to Collect Payment will automatically appear as line items at the bottom and will be automatically totaled for you. You may still need to use calculations for things like price discounts or custom line item descriptions, but simply showing and totaling line items is handled by Cognito Forms. Also, payment fields in Repeating Sections are automatically grouped when shown as line items on the invoice/receipt.