If

n = a + b

is the sample size and

r = a / (a + b)

is an estimate of the proportion of interest, then a 95% confidence interval equals

[r - 1.96 * sqrt(r * (1 - r) / n), r + 1.96 * sqrt(r * (1 - r) / n)].

You can change 1.96 to a different critical value if in need of calculating a confidence interval for a different confidence level.