Calculate stats from window output