Title: Do not round
Last modified: June 4, 2017

---

# Do not round

 *  Resolved [rphrus](https://wordpress.org/support/users/rphrus/)
 * (@rphrus)
 * [9 years ago](https://wordpress.org/support/topic/do-not-round/)
 * Hi,
    How do you prevent numbers from rounding up or down? For example I want 
   the number to include 2 decimals to the right but do not round up or down?
 * Thanks for your help.

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

 *  Plugin Author [codepeople](https://wordpress.org/support/users/codepeople/)
 * (@codepeople)
 * [9 years ago](https://wordpress.org/support/topic/do-not-round/#post-9199544)
 * Hello,
 * If you don’t want to use the “PREC” operation:
 * PREC(X,Y) rounds the X number to Y decimal places.
 * PREC(2.4536,3) = 2.454
    PREC(2.4536,2) = 2.45
 * An alternative would be the use of the `parseInt` operation:
 * `parseInt(x*100)/100`
 * For example:
 * `parseInt(1.23666*100)/100 = 1.23;`
 * Best regards.
 *  Thread Starter [rphrus](https://wordpress.org/support/users/rphrus/)
 * (@rphrus)
 * [9 years ago](https://wordpress.org/support/topic/do-not-round/#post-9199729)
 * Thank you, but how would I put using my equation:
    IF(AND(fieldname2),prec(fieldname2/
   2.2/2*80*5/200,1)
 * How can I use the parseInt to replace the PREC above?
 *  Plugin Author [codepeople](https://wordpress.org/support/users/codepeople/)
 * (@codepeople)
 * [9 years ago](https://wordpress.org/support/topic/do-not-round/#post-9203429)
 * Hello [@rphrus](https://wordpress.org/support/users/rphrus/),
 * The equation would be simply:
 * `IF(fieldname2,parseInt(fieldname2/2.2/2*80*5/200*100)/100,1)`
 * Best regards.

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

The topic ‘Do not round’ 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/)

 * 3 replies
 * 2 participants
 * Last reply from: [codepeople](https://wordpress.org/support/users/codepeople/)
 * Last activity: [9 years ago](https://wordpress.org/support/topic/do-not-round/#post-9203429)
 * Status: resolved