This demo computes the average rate of change for $y$ (defined by a formula or table of values) as $x$ changes according to a given list of inputs. The average rate of change is merely the slope of a given secant line. To visualize what is being computed the graph of $y=f(x)$ is plotted along with line segments whose slopes are the desired average rates of change.
You may either select a built-in demo or enter an example of your own. The "formula" button is selected by default. You can enter a formula for $y=f(x)$ then give a list of $x$ values. After clicking the "update" button, the demo will then compute a table of $y$ values, the average rates of change as we move from one $x$ value to the next, and determine a reasonable plot domain and produce the plot. If you select the "table" button, the formula will be ignored and after punching in your list of $y$ values and hitting "update", the demo will compute the table of average changes and again produce a plot.
Note: When "table" is selected, an interpolating polynomial is computed and plotted. This is one possible function that fits the given $(x,y)$ data. Also, the list of $x$ values should not contain repeated values. If so, this will cause an error. Listing $x$ values out of order will produce a strange plot.
The computation above is powered by SageMath. The Sage code is embedded in this webpage's html file. To view the code instruct your browser to show you this page's source. For example, in Chrome, right-click and choose "View page source".