calculate whether goal was met