• Resolved raphael00

    (@raphael00)


    Hi,

    I am trying to do a Declining Depreciation calculation in a Forminator Calculation however am unable to.

    The result i require = (Purchase Price)*(1-((Yearly Depreciation Percentage)/100))^(Years of Ownership))

    Input Variables:
    Purchase Price: $100,000
    Years of Ownership: 7
    Yearly Depreciation: 15%

    Result = (100,000)*(1-((15)/100))^(7)) = $32,057.70…

    Can i somehow do this in the calculations field?

    Thank you!

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support Williams – WPMU DEV Support

    (@wpmudev-support8)

    Hi @raphael00

    I hope you’re well today and thank you for your question!

    I see that the form in question is a bit more complex so I’m not sure if there are any additional factors/fields/calculations included but I tried to set it up on my own test site.

    I understand that, following the example from your post, the “$32,057.70” is the correct result – expected from this calculation, right?

    If yes, then please try importing this example form (that I made) to your site and test it:

    https://pastebin.com/G280Bwzd

    The form has only four fields – price, years of ownership and yearly deprecation % and calculations so if it’s fine, you can actually copy that formula to your form and just adjust fields names in it.

    Best regards,
    Adam

    Thread Starter raphael00

    (@raphael00)

    Hi Adam,

    Thank you for that. How do I import that code to my site?

    The main thing I need is the ability to use the exponent (x^y)

    Plugin Support Williams – WPMU DEV Support

    (@wpmudev-support8)

    Hi @raphael00

    To import it to your site simply:

    – copy the code that I shared from pastebin (click “raw” button above the code and then just copy it)
    – go to “Forminator -> Forms” page and click “Import” button at the top
    – paste the code there into popup and click “Import” button below it.

    You’ll see the new form on form list and you can use this form just like any other.

    It seems that even though ^ character (as exponentiation operator) is supported by the plugin, there may be some issue with inputting it. This would be a bug that we weren’t yet aware of and I have already reported it to our developers.

    As a workaroudn for now, you can just “copy-paste” that operator into calculation formula and it will work.

    Best regards,
    Adam

    Thread Starter raphael00

    (@raphael00)

    Hi Adam,

    Copy and pasting the exponent operator worked perfectly, thank you!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Calculating Declining Depreciation’ is closed to new replies.