It's good design to separate user interface from business logic in your application. Displaying (intermediate) results is user interface; calculating them is business logic, in this case.
For the...