Title: PREC function
Last modified: September 8, 2018

---

# PREC function

 *  Resolved [wordpressivan007](https://wordpress.org/support/users/wordpressivan007/)
 * (@wordpressivan007)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/prec-function/)
 * Good afternoon!
 * I try to use the PREC function, but it does not approximate it to 2 digits, it
   keeps showing me all the digits.
 * Thank you
 * Anibal
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fprec-function%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Plugin Author [codepeople](https://wordpress.org/support/users/codepeople/)
 * (@codepeople)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/prec-function/#post-10670287)
 * Hello [@wordpressivan007](https://wordpress.org/support/users/wordpressivan007/),
 * Your webpage includes multiple forms, and none of them uses the PREC operation.
 * The PREC operation requires two parameters, the first one is the number to round,
   and the second one the number of decimal places.
 * Could you let me know where are you using the PREC operation and how, please?
 * Best regards.
 *  Thread Starter [wordpressivan007](https://wordpress.org/support/users/wordpressivan007/)
 * (@wordpressivan007)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/prec-function/#post-10674160)
 * Hello good day!
 * I removed the PREC function since I could not make it work…
 * I was using it like this:
 * PREC(fieldname1+fieldname2)/fieldname3*100
 * Tell me what I did wrong..
 * Thank you
 * Anibal
 *  Plugin Author [codepeople](https://wordpress.org/support/users/codepeople/)
 * (@codepeople)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/prec-function/#post-10674221)
 * Hello [@wordpressivan007](https://wordpress.org/support/users/wordpressivan007/),
 * The use of the PREC operation would be:
 *     ```
       PREC((fieldname1+fieldname2)/fieldname3*100,2)
       ```
   
 * PREC would be the outermost operation operation in the equation, and requires
   two parameters, the first one is the number to transform, and the second one 
   the number of decimal places in the result.
 * Best regards.
 *  Thread Starter [wordpressivan007](https://wordpress.org/support/users/wordpressivan007/)
 * (@wordpressivan007)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/prec-function/#post-10674444)
 * Hello!
 * Ok, thank you
 * Anibal

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘PREC function’ 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/)

## Tags

 * [prec](https://wordpress.org/support/topic-tag/prec/)

 * 4 replies
 * 2 participants
 * Last reply from: [wordpressivan007](https://wordpress.org/support/users/wordpressivan007/)
 * Last activity: [7 years, 7 months ago](https://wordpress.org/support/topic/prec-function/#post-10674444)
 * Status: resolved