I’m working on a probability calculator, where coin flip probability for 3 heads from 3 flips is (1/2)^3*100

What I’m not sure how to calculate is from 4 flips, what is the probability of 2 heads and 2 tails?

After that I’ll be looking for how to calculate the probabilities when throwing regular 6 sided dice…