Let’s do it the hard way.
If there are two people, A & B, what are the chances of them having the same birthday? 1 in 365 (forget about leap year, okay?).
Suppose there are 3 people, A, B & C. What are the odds that any two of them have the same birthday? Well, there’s a 1 in 365 chance A and B do, a 1 in 365 chance that A & C do, and a 1 in 365 chance that B & C do. So, the chances are 3 in 365. STILL pretty remote. With 4 people, A B C & D, there are six possible combinations that might match (AB, AC, AD, BC, BD, CD). STILL pretty remote. With 5 people, you have 10 possible combinations (AB AC AD AE BC BD BE CD CE DE). 10 out of 365 is still pretty slim.
With 20 people, you have 190 chances in 365. That’s the first point at which the odds say you’ll PROBABLY have two people with the same birthday.
With 21-27 people, again, the odds say you’d PROBABLY have two people with the same birthday.
However 28 is the number at which it becomes (almost) a mathematical certainty that you’ll have two people with the same birthday.
With 4 people, there are 6 chances in 365. With 5 people, 10 chances in 365.