It's more numerically stable than either the two-pass or online simple sum of squares collectors suggested in other responses. The stability only really matters when you have lots of values that are close to each other as they lead to what is known as "catastrophic cancellation" in the floating point literature.
You might also want to brush up on the difference between dividing by the number of samples (N) and N-1 in the variance calculation (squared deviation). Dividing by N-1 leads to an unbiased estimate of variance from the sample, whereas dividing by N on average underestimates variance (because it doesn't take into account the variance between the sample mean and the true mean).
I wrote two blog entries on the topic which go into more details, including how to delete previous values online:
You can also take a look at my Java implement; the javadoc, source, and unit tests are all online:
stats.OnlineNormalEstimator
stats.OnlineNormalEstimator.java
test.unit.stats.OnlineNormalEstimatorTest.java
Center one and right/left align other flexbox element
How to store objects in HTML5 localStorage/sessionStorage
How do I modify the URL without reloading the page?
Why doesnt percentage height work in HTML/CSS?
How can I validate an email address in JavaScript?
How can I vertically center a div element for all browsers using CSS?
How can I horizontally center an element?
Get top n records for each group of grouped results
Connect Java to a MySQL database
Syntax error due to using a reserved word as a table or column name in MySQL