For every cardinal $\kappa$ does there exist a Boolean algebra that has exactly $\kappa$ many ultrafilters?

If $X$ is compact Hausdorff and zero-dimensional its clopen algebra Clop($X$) only has fixed ultrafilters by compactness, so exactly $|X|$ many.

I think that for every infinite cardinal $\kappa$, its successor ordinal $\kappa +1$ in the order topology is just such a space. So yes. (For finite cardinals $n$ just take $\mathscr{P}(n)$ of course).


Let $FC(X)$ denote the Boolean algebra of finite and co-finite subsets of $X$.
Then the ultrafilters of $FC(X)$ are the principal filters $\uparrow\!\{x\}$, with $x \in X$ together with the free ultrafilter consisting of the co-finite subsets of $X$ (see here).
So $FC(X)$ has $\kappa$ many ultrafilters, whenever $|X| = \kappa$.