Hi @BrianM66 Thanks for stopping by the community! We’re happy to help with calculations/logic! Do you mind sharing a bit more information on what exactly you’re trying to calculate (ex, specific variables, etc)? Thanks!
I am trying to create multiple pages that will calculate user inputs on final page
I am hoping we can have a mix of inputs like percentages and whole numbers / $
@john.desborough might have some suggestions to help you get started! Can you explain a bit more about what variables you’ll want to use?
Liz wrote:
@john.desborough might have some suggestions to help you get started! Can you explain a bit more about what variables you’ll want to use?
@BrianM66 - if you can lay out your context and provide the basics of your calculation, it will be easier to let you know how quickly this can be resolved
cheers
des
Hi @john.desborough - I’m building a multistep ROI calculator in Typeform designed to help users estimate the annual return on investment (ROI) of a software solution based on their desired outcomes. The calculator dynamically calculates the Annual Benefit (AB) for selected outcomes and aggregates them to provide a Total Annual Benefit (total_ab). The ROI is then calculated by comparing the Total Annual Benefits against the Total Costs.
Step 1: Annual Benefit Calculations
In the first step, users select the outcomes they want to calculate. Each outcome’s Annual Benefit (ab) is calculated using a simple formula:
(x * y) * z = Annual Benefit (ab)
Here’s an example for one of the outcomes:
Outcome: Increased Engagement
- Variable 1 (x): Number of Contacts
- Variable 2 (y): Increase in Engagement Rate (%)
- Variable 3 (z): Value per Engaged Contact ($)
Example Inputs:
- Number of Contacts: 10,000
- Increase in Engagement Rate: 15%
- Value per Engaged Contact: $30
Example Calculation:
(10,000 * 0.15) * $30 = $45,000
This formula structure is consistent across all outcomes, with different variables tailored to each. For instance:
- Improved Efficiency: Projects * Time Saved per Project * Cost per Unit Time
- Reduced Costs: Current Spend * Reduction Percentage
- Improved Trust: Cost of Opposition * Reduction Percentage
- Improved Satisfaction: Complaints * Decrease Percentage * Cost per Complaint
If multiple outcomes are selected, the Annual Benefits are summed into a Total Annual Benefit (total_ab).
Step 2: ROI Calculation
In the second step, the ROI is calculated using the formula:
ROI = (Total Annual Benefits - Total Costs) / Total Costs
Example:
- Total Annual Benefits: $357,000
- Total Costs: $37,550
Calculation:
($357,000 - $37,550) / $37,550 = 8.51
This ROI indicates that for every $1 spent, the return is $8.51.
Problem Description
While I’ve set up variables and defined calculations for each step, the results are not calculating correctly. To simplify troubleshooting I’ve created a simplified Typeform focused solely on calculating the Annual Benefits for a single outcome: Increased Engagement. Below are the key aspects of my setup:
- Variables for each input and calculation have been created.
- The formula is applied to each outcome and Total Annual Benefit.
- The ROI calculation references the Total Annual Benefit and Total Costs.
I suspect an issue with how the variables are referenced or calculated across steps. Any insights on debugging this or ensuring the multi-step calculations work smoothly in Typeform would be greatly appreciated.
Note
Default values are provided for all fields in case users don’t have specific numbers, and a disclaimer clarifies this.
@BrianM66 - sorry for the delay.. been trying to hide away from the computer and build Lego instead lol..
using your details, i put together a sample version of the quiz at this link
i used a multiple select multiple choice for the first question and built the logic off the top of that.
i made an assumption in here, that the total costs would be equal to the response to ‘current spend’ + ‘cost of opposition’ - i was uncertain how you gathered your costs but that’s how i did it in the example.
have a walk through the quiz - and let me know that you think: where does your calculation logic fall apart?
des
Let us know how this goes for you, @BrianM66 !