Title: Basic % Calculation
Last modified: August 14, 2019

---

# Basic % Calculation

 *  Resolved [smartnetnyc](https://wordpress.org/support/users/smartnetnyc/)
 * (@smartnetnyc)
 * [6 years, 10 months ago](https://wordpress.org/support/topic/basic-caculation/)
 * We just need a simple calculation for our website payment page…
    [Invoice Amount]
   + [0.03 Fee] = [Total Amount]
 * Please advise the best way to achieve this. Thank you.
    -  This topic was modified 6 years, 10 months ago by [smartnetnyc](https://wordpress.org/support/users/smartnetnyc/).

Viewing 1 replies (of 1 total)

 *  Plugin Author [codepeople](https://wordpress.org/support/users/codepeople/)
 * (@codepeople)
 * [6 years, 10 months ago](https://wordpress.org/support/topic/basic-caculation/#post-11832371)
 * Hello [@smartnetnyc](https://wordpress.org/support/users/smartnetnyc/)
 * The description of your form is too general. So, I’ll try to describe the process
   with a hypothetical example.
 * Assuming you have created a form with three checkbox fields: fieldname1, fieldname2,
   and fieldname3, respectively. Each of them for a different group of services.
 * Every choice in the checkbox fields is composed of the service name (as the choice’s
   text) and its corresponding price (as the choice’s value).
 * Furthermore, you want to increase the result into a 3% (as processing fee)
 * For this hypothetical example, you simply should insert a calculated field in
   the form with the equation:
 *     ```
       (fieldname1+fieldname2+fieldname3)*1.03
       ```
   
 * As the equation should return a currency value, you should round the result to
   two decimal places. I recommend you to use the PREC operation. PREC(X,Y) returns
   the number X rounded to Y decimals.
 * Finally, the previous equation should be modified as follows:
 *     ```
       PREC((fieldname1+fieldname2+fieldname3)*1.03, 2)
       ```
   
 * and that’s all.
    Best regards.

Viewing 1 replies (of 1 total)

The topic ‘Basic % Calculation’ is closed to new replies.

 * ![](https://ps.w.org/calculated-fields-form/assets/icon-256x256.jpg?rev=1734377)
 * [Calculated Fields Form](https://wordpress.org/plugins/calculated-fields-form/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/calculated-fields-form/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/calculated-fields-form/)
 * [Active Topics](https://wordpress.org/support/plugin/calculated-fields-form/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/calculated-fields-form/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/calculated-fields-form/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [codepeople](https://wordpress.org/support/users/codepeople/)
 * Last activity: [6 years, 10 months ago](https://wordpress.org/support/topic/basic-caculation/#post-11832371)
 * Status: resolved