# How to Calculate Wire for Solenoid Coils

Solenoid Coil Calculator
Cylinder Length mm
Number of Layers

A solenoid coil inductor consists of copper wire wrapped around a metal tube. When a current passes through the wire, the solenoid becomes an electromagnet. Solenoid coils are widely used in electronic devices and industrial machinery. You can buy them wholesale from parts suppliers, or wind your own coils. If you are winding your own solenoid coil, you can apply the formulas below to find the length of wire needed, or use the calculator at left.

The length of wire needed to wind a solenoid inductor depends on the radius of the cylinder, the length of the cylinder, the radius of the wire, and the number of layers of wire that are coiled around the cylinder.

## Coil Formula

Call the radius of the cylinder A, the length B, the radius of the wire R, and the number of layers M. When you coil the wire around the cylinder in a single layer, the length of wire needed, L1, is given by the equation

L1 = [B/(2R)]sqrt[(2pi(A+R))2 + (2R)2]
= (B)sqrt[(pi(1 + A/R))2 + 1].

When you wrap a second layer of wire over the first layer, the radius of the cylinder increases from A to A+2R. Thus, the length of wire needed for the second layer, L2, is given by the equation

L2 = (B)sqrt[(pi(1 + (A+2R)/R))2 + 1]
= (B)sqrt[(pi(3 + A/R))2 + 1],

and the total length of wire needed is L1 + L2. You can repeat this procedure to find the amount of wire needed to completely wrap a solenoid coil with M layers of wire. The length of wire needed for the nth layer is

Ln = (B)sqrt[(pi((2n-1) + A/R))2 + 1],

and so the total length of wire needed is L1 + L2 + ... + LM.