# Tool, algorithm or method to know which resistors to use for an equivalent resistance $R_T$?

Say I have to get a resistance $R_{T}$ and I have a bunch of resistors, $R_1, R_2, \ldots, R_n$.

Does there exist a tool, algorithm, or method that gets the resistance value closest to $R_T$ by connecting (one or more) of the resistors $R_1, R_2, \ldots, R_n$ in series, in parallel or a combination of those two? And how to connect those resistors to get that value? So not trial and error. :)

• Unfortunately for all the times I had to have matched pairs of resistors (matched to within.05%), I had to manually go through reels of resistors, which tend to slowly go up or down in value but stay within their own tolerance. – Sparky256 Jul 8 '16 at 20:53
• jansson.us/resistors.html (seems to do what you want, but with some constraints - e.g. using standard series for Rx and only 2 in series/parallel) – Zuofu Jul 8 '16 at 20:55
• This question makes little sense without constraints, otherwise the answer is to find $N$ and $M$ so that $\frac{R_i}{R_T}=\frac{M}{N}$, then connect $N$ resistors $R_i$ in series, and $M$ such series in parallel. – Dmitry Grigoryev Oct 5 '17 at 9:22