Title: simple math problem.
Last modified: April 20, 2025

---

# simple math problem.

 *  Resolved [dealerprincipal](https://wordpress.org/support/users/dealerprincipal/)
 * (@dealerprincipal)
 * [1 year, 1 month ago](https://wordpress.org/support/topic/simple-math-problem/)
 * Building a form with Calculated Fields to show various math solutions when a 
   variable is chosen. Start with a fixed number in fieldname2. Separator1 for info
   only. Slider, fieldname3, to choose a percent from 1 to 50. Calculator, fieldname1,
   to multiply fieldname2, by fieldname3. Example 280 in fieldname2, .10 in fieldname3.
   Result in fieldname1, 28 10% of 280 is 28. Simple.
 * Can’t get the proper formula in the Calculated field where the Set Equation window
   in Field Settings.
 * The next problem would be how to make the first reference in the next set to 
   fieldname1 above. The first set would be duplicated 5 times.

Viewing 1 replies (of 1 total)

 *  Plugin Author [CodePeople2](https://wordpress.org/support/users/codepeople2/)
 * (@codepeople2)
 * [1 year, 1 month ago](https://wordpress.org/support/topic/simple-math-problem/#post-18426796)
 * Hello [@dealerprincipal](https://wordpress.org/support/users/dealerprincipal/)
 * Thank you so much for using our plugin.
 * If fieldname1 is a number, and fieldname2 is a slider field from 1 to 50 that
   you want to treat as a percentage, the equation in the set equation attribute
   of the calculated field would be:
 *     ```wp-block-code
       fieldname1*fieldname2/100
       ```
   
 * If you want to allow only two decimal places, you can edit the equation as follows:
 *     ```wp-block-code
       PREC(fieldname1*fieldname2/100, 2, true)
       ```
   
 * PREC(x, y) rounds the number x with y decimals. Passing true as the third parameter
   tells the plugin not to include .00 when x is an integer number.
 * Once the first pair is created, you can duplicate it as many times as you want.
   To simplify the process, include them in a DIV field and duplicate it. Please
   watch the following video:
 * [https://resources.developers4web.com/cff/tmp/2025/04/20/video.mp4](https://resources.developers4web.com/cff/tmp/2025/04/20/video.mp4)
 * Best regards.

Viewing 1 replies (of 1 total)

The topic ‘simple math problem.’ 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

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

 * 1 reply
 * 2 participants
 * Last reply from: [CodePeople2](https://wordpress.org/support/users/codepeople2/)
 * Last activity: [1 year, 1 month ago](https://wordpress.org/support/topic/simple-math-problem/#post-18426796)
 * Status: resolved