Holy $hit I did it! Here's the formula as best I can write it without proper subscripts, superscripts, etc.
W = chances of success on the roll
T = target number
D = dice used
S = successes needed e.g. threshold +1
C = (truncate (T-1)/6) + 1 (=1 for target numbers 2 through 6, 2 for 7 through 12, etc)
B = 6C+1
A = 6^C-B
K(n,S) =
1*(n-1)*(n-2)*(n-3)...*[n-(S-1)].............1*(S-1)*(S-2)*(S-3)...*[S-(S-1)]
W = Sum from n=S to D of K(n,S)*(T-A)^(n-S)*(B-T)^S/6^(C*n)
I also wrote it up in QBasic. I'll edit that in below right after the spoiler test. It's in spoilers for length.
[ Spoiler ]
DEFINT A-Z
'variable list
'W# = chances of winning
' (the # sign is a qbasic shortcut denoting double precision)
'D = dice used
'T = target number
'S = successes needed (for example: threshold + 1)
'A = formula constant (changes with each new target number)
'B = formula constant (changes with each new target number)
'C = formula constant (changes with each new target number)
'K = variable whole number that changes with each summation step
'f = K numerator
'g = K denominator
'e = multiplication step variable
'n = summation step variable
'special note: QBasic skips a for:next loop if the initial step is past
' (higher than) the final step. This avoids a 0/0 when determining K.
10
INPUT "How many dice"; D
IF D < 1 THEN PRINT "Invalid number!": GOTO 10
20
INPUT "What is the target number"; T
IF T < 2 THEN PRINT "Invalid number!": GOTO 20
30
INPUT "How many successes do you need"; S
IF S < 1 OR S > D THEN PRINT "Invalid number!": GOTO 30
C = INT((T - 1) / 6) + 1
B = 6 * C + 1
A = 6 ^ C - B
W# = 0
FOR n = S TO D
f = 1
FOR e = 1 TO S - 1
f = f * (n - e)
NEXT e
g = 1
FOR e = 1 TO S - 1
g = g * (S - e)
NEXT e
K = f / g
W# = W# + K * (T + A) ^ (n - S) * (B - T) ^ S / 6 ^ (C * n)
NEXT n
PRINT
PRINT USING "Your chances of winning are###.##%."; W# * 100
PRINT
GOTO 10
edit: fixed the last term C*n not 6*n!