title: Calculate Words Per Minute in real time
body: <p>Alright so I've tried to research some formulas on how to calculate words per minute, I couldn't find anything. I'm trying to use the current formula to calculate the words per minute (It is currently inside a thread):</p>
  
  <pre><code>errors = numberOfIncorrectCharacters();
  int wordsCount = (int)(typingArea.getText().length()/5);  
  int newWPM = (int)(wordsCount/seconds)-(errors*2);  
  if(newWPM &gt;= 0){
      WPM = newWPM;  
  }
  </code></pre>
  
  <p>(seconds: I have a timer that executes every 1000 MS and than increments seconds by 1 everytime it does.)</p>
  
  <p>And then I'm painting the variable WPM to the screen. But it's definitely not working correctly. If anyone can help me with a formula to calculate the words per minute in realtime, it would be very appreciated. Thanks for any help you offer.</p>