# Calculation Form with 3 field 2 needed to calculate a 3rd \[RESOLVED\]

**URL:** <https://community.gravityforms.com/t/calculation-form-with-3-field-2-needed-to-calculate-a-3rd-resolved/13648>\
**Category:** Get Help\
**Tags:** custom, calculations, calculator\
**Created:** [October 17, 2022, 5:28pm UTC](https://community.gravityforms.com/t/calculation-form-with-3-field-2-needed-to-calculate-a-3rd-resolved/13648 "2022-10-17T17:28:15Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![dcoburn](https://avatars.discourse-cdn.com/v4/letter/d/ea5d25/32.png) [@dcoburn](https://community.gravityforms.com/u/dcoburn)\
**Post date:** [October 17, 2022, 5:28pm UTC](https://community.gravityforms.com/t/calculation-form-with-3-field-2-needed-to-calculate-a-3rd-resolved/13648/1 "2022-10-17T17:28:15Z")

</div>

I want to be able to calculate the cost per 1000 units.

There would be 3 fields:  
Cost per 1000, Total # of units, Total Cost  
If you put in the first two it calculates cost{ Cost per 1000} \* ({total # units}/1000) = total cost  
If you put in {Total Cost}/{Cost per 1000} \* 1000 = Number of Units  
If you put in {Total Cost}/({Total # of units}\*1000) = cost per 1000 units

Is that possible with forms?

---

<div class="post-metadata">

**Author:** ![sacom](https://sea2.discourse-cdn.com/flex020/user_avatar/community.gravityforms.com/sacom/32/53_2.png) [@sacom](https://community.gravityforms.com/u/sacom)\
**Post date:** [October 18, 2022, 4:15pm UTC](https://community.gravityforms.com/t/calculation-form-with-3-field-2-needed-to-calculate-a-3rd-resolved/13648/2 "2022-10-18T16:15:59Z")

</div>

The following documentation explains how you can create calculation fields: [https://docs.gravityforms.com/using-calculations/](https://docs.gravityforms.com/using-calculations/)

---

<div class="post-metadata">

**Author:** ![dcoburn](https://avatars.discourse-cdn.com/v4/letter/d/ea5d25/32.png) [@dcoburn](https://community.gravityforms.com/u/dcoburn)\
**Post date:** [October 18, 2022, 9:04pm UTC](https://community.gravityforms.com/t/calculation-form-with-3-field-2-needed-to-calculate-a-3rd-resolved/13648/3 "2022-10-18T21:04:29Z")

</div>

Thanks, I’ve looked at that, but it doesn’t answer my specific use case. I can do these each individually or with JavaScript. I was hoping GF would do it, so I didn’t have to hand-code it.

---

<div class="post-metadata">

**Author:** ![chrishajer](https://sea2.discourse-cdn.com/flex020/user_avatar/community.gravityforms.com/chrishajer/32/88_2.png) [@chrishajer](https://community.gravityforms.com/u/chrishajer)\
**Post date:** [October 20, 2022, 6:06pm UTC](https://community.gravityforms.com/t/calculation-form-with-3-field-2-needed-to-calculate-a-3rd-resolved/13648/4 "2022-10-20T18:06:18Z")

</div>

Hi Daniel. I think I understand the requirements. Given any two inputs, you calculate the third. The closest I could come with Gravity Forms is this: [https://demo.chrishajer.com/calculations/](https://demo.chrishajer.com/calculations/)

Look at that form and see if it comes functionally close to what you need. If you’re interested, you can download that form from here: [gravityforms-export-2022-10-20.json.txt - Droplr](https://d.pr/f/aLic40)

Save that file with any file name, but it has to have a `.json` extension. Then, go to your WordPress dashboard and then Forms → Import/Export → Import Forms and upload this file. Take a look at how that is configured and let me know if you have any questions.

---

<div class="post-metadata">

**Author:** ![dcoburn](https://avatars.discourse-cdn.com/v4/letter/d/ea5d25/32.png) [@dcoburn](https://community.gravityforms.com/u/dcoburn)\
**Post date:** [October 21, 2022, 2:02am UTC](https://community.gravityforms.com/t/calculation-form-with-3-field-2-needed-to-calculate-a-3rd-resolved/13648/5 "2022-10-21T02:02:58Z")

</div>

Thanks, that’s really interesting putting the result as a conditional. I appreciate your sharing!

---

<div class="post-metadata">

**Author:** ![chrishajer](https://sea2.discourse-cdn.com/flex020/user_avatar/community.gravityforms.com/chrishajer/32/88_2.png) [@chrishajer](https://community.gravityforms.com/u/chrishajer)\
**Post date:** [October 21, 2022, 1:18pm UTC](https://community.gravityforms.com/t/calculation-form-with-3-field-2-needed-to-calculate-a-3rd-resolved/13648/6 "2022-10-21T13:18:41Z")

</div>


