I need the formula for calculating the odds that at least 1 die in a given dice pool will roll a 1. I also need this to work with multiple dice faces, this is for a project I'm working on and I'm struggling to find it.

PFP by: Pericote9
Hello! I am a nerd who is working on a TTRPG game! Check out my Pinned posts for more info!
I am legally required to state that I am over 14,000 pokecoins in debt to Professor Willow.
I need the formula for calculating the odds that at least 1 die in a given dice pool will roll a 1. I also need this to work with multiple dice faces, this is for a project I'm working on and I'm struggling to find it.
It's going to be something around:
1 - (((s-1)/s)^n)
Where s is the number of sides your die has (e.g. d6) and n is the amount of dice you are rolling.
If you were rolling 4d6, the probability at least one side will land as a one is:
1 - (((6-1)/6)^4)
1 - ((5/6)^4)
1 - (625/1296)
1 - (~.482)
~0.518
~51.8% chance of rolling at least one 1 in 4d6.
If this is wrong I blame me being sleepy...
For adding different face count die together, you'd have it like:
1 - ((((sA-1)/sA)^nA) * (((sB-1)/sB)^nB) * ... )
Where sA is the sidecount of die A, nA is the amount of A dice rolled, sB and nB are the sidecount and amount of B dice rolled respectively, and you can continue this for as many dice you wish to roll.
Thank you! I think you nailed it, I'm working on a concept for a dice rolling game and wanted a way to quickly get probabilities of stuff for testing. I appreciate the help!
I think this should work, here's a quick screenshot of the readout. Also, ignore the typo, I already fixed it lmao.
Great work! Glad my sleep deprivedness didn't get in the way! I'm looking forward to what system you come up here!
Easiest way is gonna be to flip the problem around, and ask what are the odds that no die will roll a 1.
First, for each die, divide the number of non-1 faces by the total number of faces. Eg, a standard d6 is 5/6, d20 is 19/20. The result will be the probability that the given die won't roll a 1.
Then, once you have the probability for each individual die, just multiply them together. Finally, invert the result.