The first step is to calculate the monthly volatility of each stock's return. You can easily do this using an Excel spreadsheet and calculating the standard deviation (stdev function) of the 12 monthly returns for each stock, as shown in the chart above.
Doing this gives a monthly standard deviation (volatility) of 17.9% for Stock A and just 3.6% for Stock B. This confirms the optics in the chart. In other words, Stock A is a more volatile -- and, some might say, riskier -- investment than Stock B.