6

This is a problem I've ran into several times, and I imagine that others have ran across it too.

Basically, I have a complicated equation, and I want the user to type in the values needed to calculate the results. (For what it's worth, there are good default values for the variables in the equation.)

I've constructed a GUI that shows the user the names of the variables/fields that need to be provided, along with a control (like a numeric up/down, slider, etc.) to enter the values of the field. Below that, I have an area that shows the output of the equation.

So my question is this. Should my results area automatically change the calculated results whenever the user makes any changes to any of the input fields, or should they push a "Calculate" button to generate the results?

One other thing that probably applies is that the user is not trying to "get the right answer" out of the results. They shouldn't be using the output to then go back and modify the input to get a better answer.

Are there any benefits to requiring the button press? Is the extra click to see the results worth those benefits?

3
  • Given what you stated, I see no reason to require a Calculate button.
    – Hisham
    Feb 1, 2012 at 17:21
  • Can you give a few sample equations? Would like to know how complex the calculations are.
    – Marielle
    Feb 1, 2012 at 23:03
  • Erhm... uh... not sure what I can and can't say. I don't know what's proprietary. The equation is probably along the lines of the quadratic equation in terms of complexity.
    – rbwhitaker
    Feb 1, 2012 at 23:08

9 Answers 9

4

If none of the following apply, then you are probably better off without a calculation button:

Possible reasons for a calculation button:

  • Calculation has side effects to system and therefore probably shouldn't be done until user has completed input

  • Output interferes with input

    • Calculation takes a noticeable amount of time (e.g. 0.5 seconds) and therefore appears after delay and may cause user to believe that the result of previous input is actually the result of last input

    • Calculation blocks UI for more longer than half the amount of type it takes the user to type a character than (e.g. 0.1 seconds)

    • Output and input appear in the same place (e.g. a simple hardware calculator)

  • Output produces with partial input may result in a confusing output (e.g. error if trying to calculate 0!)

  • You need to make sure the user has entered all inputs (hasn't forgotten to change defaults), although a calculation button alone will not be enough for this

  • System may miscalculate if inputs changed out of expected order (though this should really be fixed in system, not UI)

1

Would be interested to hear too. Few points to consider: Is the user entering many values at once? if so you would need to decide when to do the calculation: on entering the final value? what about if they update a value? does it update on editing any of the values?

Personally I cant see why a calculate button would definitely be required but it may depend upon the specific context, such as how long the inputting/thinking takes.

1
  • All of the fields have default values already. There's no "missing data," per se. So we wouldn't have to wait until the last value is entered to calculate. I think the idea would be to update whenever a value is modified. As far as the "thinking" goes, while the equation is complicated (hence the need for a computer to do it) there's nothing in the equation that would be slow. The human will think the calculation happens instantly. I'm glad you're bringing that up though.
    – rbwhitaker
    Feb 1, 2012 at 17:34
1

It really depends on the context, and I don't think we know enough about the particulars to give a really good answer, but given what you've said I'll say NO: if a calculation occurs at every value change, then the button would be redundant.

I would just caution you to focus on such things as:

  • ensuring that the calculated value change really is visible to/noticed by the user
  • calculations being independent of the order of variable input
  • any validation on the input doesn't interfere with the calculating action (here I'm thinking of a web app in which you are checking input fields for valid numeric values, and if one returns false it breaks the functionality such that the user input is lost or a calculation is missed)
4
  • Great points. Thanks! On that last one, if you go the automatic update route, the value could be updated not at every key press, but rather, when a value is successfully changed. So if the user enters invalid data, no calculation would be done. There would be a possibility of clearing out the result to be blank. I'd imagine you could do a similar thing if you go the "Calculate" button route, by disabling it when something is invalid. Does that sound about right?
    – rbwhitaker
    Feb 1, 2012 at 17:45
  • I would probably go this route: if invalid, no calculation (obviously!), and flash warning that it is invalid & needs to be fixed. This would keep the user still in control of the change-means-calculate action, and would also mean you won't have -- for the first time -- a blank field. The key is really continuing to communicate to your users just what is going on when they are doing an action. Never want them to be unsure.
    – jcmeloni
    Feb 1, 2012 at 17:49
  • The controls we're using (numeric up-downs in C# and radio buttons) will actually do data validation on their own, and prevent the program from getting into an invalid state, I believe. (I'll know better, once we start actually implementing it.) I'm hoping that validation won't be too big of a problem as a result, in this particular case, but the ideas you're bringing up are great advice the next time I run into this!
    – rbwhitaker
    Feb 1, 2012 at 17:53
  • Great! I hope it works out.
    – jcmeloni
    Feb 1, 2012 at 17:58
0

if it already calculates automatically when you insert the value, the button becomes useless. It can even cause confusion in it, because the value has been calculated without clicking on the button, then the User clicks on calculate button, it gives the impression that nothing happened and who did not calculate

1
  • No, the choice is between automatically updating the answer or having a "Calculate" button. It wouldn't do both.
    – rbwhitaker
    Feb 1, 2012 at 17:35
0

How long does it take to compute? This may determine the answer. Less than about 0.5 seconds and it will seem 'automatic'.

Also, if you don't want users gimmicking the inputs, then yes, make it a calc button that takes you to another screen--but why do you care? Users will find a way to do that if they want to. Is this for a test or something? If so, you could record only the first answer, but let them tinker with it--that's a form of learning.

3
  • The calculation will probably be about 50 machine instructions. There's a lot of multiplications, additions, and a cube root. but nothing that will take long. I honestly expect it to be only a few milliseconds to complete.
    – rbwhitaker
    Feb 1, 2012 at 18:17
  • You don't only have to worry about the calculation; rendering it and pushing the pixels around can add some significant time. But it sounds like you're in the realm of 'instant'--and so you might even want to purposely delay before recalculating, say, 0.3-0.5 seconds. Feb 1, 2012 at 18:22
  • Good point about how people will do it anyway. No, it's not for a test or anything. It's fine if it recalculates multiple times. Just one of the people I worked with expressed a little concern that someone might see the answer, then go back and fudge the input to get the output to be... well... more to their liking.
    – rbwhitaker
    Feb 1, 2012 at 18:23
0

Like everybody above said, it depends:

If it's a calculator like a bank loan calculator where I as a user would like to see how I customize my payments if I increase the down payment or decrease the frequency, then yeah, showing instant results change would be cooler than me having to click Calculate every time.

If it's a matter of a one time calculation where I wouldn't need to change variables, and since it sounds like there are many input fields, then a calculate button that yields the results after filling in all the info may provide a sense of satisfaction to the user as mission complete!

In the case of the first though, I would say a tiny visual indicator each time the result changes would make it more apparent for the user that the result changed, since (s)he would be looking at the input field which they changed last.

0

I would say yes for the simple reason that it provides an affordance and gives people the impression that they are in control of what they are trying to compute .Further more if the equation is complicated ,people might get confused about how certain values have impacted the result and automatic computation would add to the confusion.

That said,If you were updating a graph in real time with the results ,I would perhaps be inclined not to worry about a button since the graph is a visual representation of whats happening.

3
  • Yes, do it automatically, or yes, have a button? I get the feeling it's yes to the button, but I'm not sure. There's no graph, just the output of the equation. But I also am putting some text explains how their input data is being converted in the intermediate parts of the calculation. I know, it's not visual, but they're not totally left in the dark about how their data is being used in the calculation.
    – rbwhitaker
    Feb 1, 2012 at 19:31
  • Well the question that arises is will people understand the text or even bother to read it,I dont know what your target audience is but if its someone who is not very conversant with maths and your text is not simple enough,you would have them scratching their heads even more
    – Mervin
    Feb 1, 2012 at 19:33
  • My target audience is doctors. They're smart people. But that doesn't mean they'll read the text. Nobody reads the text. You have a good point.
    – rbwhitaker
    Feb 1, 2012 at 19:43
0

From what you've said; No. The results should definitely be calculated automatically.

Adding a calculate button is not necessary and even costly if the user has to repeatedly use the system (A dozen calculations and that's a dozen clicks saved).

That said, it sounds like you are implementing something that is close to the norm for (ie. looks like) 'calculators' and the user must know that the field has just been updated. You may want to make explicit the recalculation (ideally flash the field or some such when it's updated and ensure it's onscreen at all times if there is room).

Also good defaults (which you supply, but for anyone else reading this in the same position) are important.

Hope that helps.

0

I've seen this interface choice both delight and confuse. The most successful implementations seems to be where there is some sort of discovery or realization that occurs by adjusting the figures. If we use a compound interest calculator, for example, tied to a graph showing cumulative interest and principal it could be illuminating to see the long term interest penalties by paying the minimum amount on a credit card.

If you have several variables that all affect an outcome then real time is probably more efficient.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.