Calculating a correlation with yes/no answers?

How do you calculate a correlation, that similar to Spearman and Pearson forumlar when you are only comparing one variable (age) to answer given by yes and no. As ages goes up more likely to answer yes. Is this possible?

Thankyou