How do I calculate condition?