et us call the two sets of data "x" and "y" (in our case Temperature is x and Ice Cream Sales is y):
Step 1: Find the mean of x, and the mean of y
Step 2: Subtract the mean of x from every x value (call them "a"), do the same for y (call them "b")
Step 3: Calculate: a × b, a2 and b2 for every value
Step 4: Sum up a × b, sum up a2 and sum up b2
Step 5: Divide the sum of a × b by the square root of [(sum of a2) × (sum of b2)]
Here is how I calculated the first Ice Cream example (values rounded to 1 or 0 decimal places):