If there are $n$ people in the room probably that no one share their birthday $ = \frac{365.364.363. \dots (365-n+1)}{365^n}$
We want this to be $\leq 0.5$ so that probability that at least $2$ share their birthday becomes $\geq 0.5$
i.e., we want least $n$ such that $$\frac{365.364.363. \dots (365-n+1)}{365^n} \leq 0.5$$
This happens for $n = 23.$