calculating K from data