In this explainer, we will learn how to calculate the magnetic field produced by a current in a solenoid.

Recall the direction of a magnetic field in a loop of a current-carrying wire. At the center of the loop, the magnetic field has one direction, as seen in the diagram below. The orange line is the magnetic field direction and black line is the wire loop.

The same loop seen from the front, with the magnetic field direction pointing out of the screen, would look like the diagram below.

Recall that the symbols below are used to show that a direction is going out of or into the screen.

The magnetic field strength at the center of a loop can be increased by placing more loops in line with it. The diagram below shows two sets of loops with the same current and the same radius lined up in this way.

The set of loops on the right has a stronger magnetic field because it has more loops.

Instead of using a set of loops, strengthening the magnetic field at the center can be achieved using a single wire with multiple turns. The diagram below shows such a wire, with a side and front view.

A wire with a series of turns like this is called a solenoid. Each turn of a solenoid contributes to the strength of the magnetic field at the center just like an additional loop would.

The magnetic field strength and direction at the very center of a solenoid is uniform. It has one direction and magnitude. Other points around the solenoid have different magnetic field directions and magnitudes.

Before looking at the magnetic field lines of a solenoid, letβs consider the angle we will be viewing it from using a single loop. The diagram below show a single loop of a current-carrying wire and its resultant magnetic field from two different angles.

The side view of this loop shows the direction in which an observer looks, indicated by the eye, to obtain the top-down view. The top-down view still shows the direction of current, going into and out of the screen, but it does not show the bottom of the loop.

Now, letβs look at the top-down view of a single loop with its magnetic field lines, in grey, in the diagram below.

When there are more magnetic field lines close together, it means there is a stronger magnetic field. We can see that at the very center of the loop, the magnetic field lines are very close to each other with the same direction, meaning it has a strong magnetic field at that point.

Outside of the loop, the magnetic field lines resemble that of a bar magnet, as seen below.

Letβs now look at a solenoid with seven turns from this angle. The diagram below shows this with its corresponding magnetic field.

Note how the magnetic field lines are consistent and straight at the very center of these wire turns, but become less consistent toward the ends of the solenoid. The closer to these ends, the less uniform the field lines.

Now, letβs consider a theoretical, very long solenoid. It is so long that we can treat it as if it had no ends. This would mean it has a perfectly uniform magnetic field within the turns at all points.

If we measured the magnetic field strength at different points within the turns of this theoretical solenoid, in each case the magnitude and direction of the magnetic field strength would be the same. The diagram below shows a theoretical solenoid with three points, indicated by the red dots, that have equivalent magnetic field strengths and directions.

The magnetic field strength within the turns of this theoretical solenoid can be determined using an equation.

### Equation: Magnetic Field Strength at the Center of a Solenoid

The magnetic field strength, , inside the center of a solenoid is found using the equation where is the current of the solenoid, is the number of turns the solenoid has, is the length of the solenoid, and is the permeability of free space, Tβ m/A.

For a real solenoid with limited length, this equation is still useful to describe the magnetic field strength at the exact center of the turns, since this is where it is uniform. The diagram below shows points with the same magnetic field strength and direction, on both a theoretical and real solenoid.

Real solenoids have a fairly constant magnetic field direction inside the turns, but not magnetic field strength. Only the center has a consistent magnetic field strength.

Looking at the equation, we see that the length of a solenoid matters when finding the magnetic field strength at the center. Specifically, that magnetic field strength is inversely proportional to length. The diagram below shows two solenoids with the same current and number of turns but with different lengths.

Since the solenoid at the bottom has twice the length, it will have half the magnetic field strength at its center.

Letβs look at an example using this equation.

### Example 1: Magnetic Field Strength at the Center of a Solenoid with Turns and Length

A solenoid has a length of 3.2 cm and consists of 90 turns of wire. The wire carries a constant current of 1.2 A. Calculate the strength of the magnetic field at the center of the solenoid. Give your answer in teslas expressed in scientific notation to one decimal place. Use a value of Tβ m/A for .

### Answer

We will use the equation to find the magnetic field strength at the center of this solenoid.

Before we can substitute in the values we are given, we need to ensure the units all match. The permeability of free space uses metres, so we need the length of 3.2 cm in metres.

There are 100 centimetres in 1 metre:

So, to convert 3.2 cm to metres, we multiply it by the relation

Thus, 3.2 cm is 0.032 m.

We can now substitute the values into the equation. The length is 0.032 m, the current is 1.2 A, there are 90 turns, and the permeability of free space is Tβ m/A. This gives us

Letβs multiply across the numerator. This cancels the units of amperes there, giving

So, now when we divide these two numbers, the units of metres cancel, leaving only teslas:

Rounded to one decimal place, the magnetic field strength at the center of the solenoid is T.

The magnetic field strength at the center of a solenoid equation can be used to find other variables in the equation if the magnetic field strength at the center of the solenoid is known. To show this, letβs look at the base equation and put all the values in terms of . Starting with the equation we can multiply both sides by :

This cancels the on the right side, leaving behind

From this form, we can divide both sides by and :

This cancels and on the right side, leaving behind just :

Letβs look at an example using this form of the equation.

### Example 2: Current Determination in a Solenoid with Turns and Length

A solenoid is formed of 35 turns of wire over a length of 42 mm. The magnetic field at the center of the solenoid is measured to be T. Calculate the current in the wire. Give your answer in amperes to 2 decimal places. Use a value of Tβ m/A for .

### Answer

Recall that the equation can be put into a form that relates the variables to current:

Before we directly substitute the values we are given into this form of the equation, we need to make sure the units match. Permeability of free space uses metres, so we need the length of the solenoid, 42 mm, to also be in terms of metres.

There are 1βββ000 millimetres in 1 metre:

So, multiplying this relation by 42 mm will give us the value in metres:

The length of the solenoid in metres is 0.042 m.

Now, we can substitute the values into the equation. The length is 0.042 m, the magnetic field strength is T, there are 35 turns, and the permeability of free space is Tβ m/A. This gives us

Multiplying across the numerator gives units of Tβ m:

The number for the turns in the solenoid is unitless, so multiplying across the denominator does not change the units:

Dividing the top across the bottom will completely cancel the units of Tβ m and leave behind amperes on the top. Looking at just the units, dividing by a fraction is the same as multiplying by its reciprocal:

So, dividing the numbers gives

Rounded to two decimal places, the answer is thus 0.47 A.

The equation can be put in terms of other variables as well. Letβs say we have a solenoid with an unknown length but with other known variables. Beginning with the base equation we can get the length onto one side of the equation by multiplying both sides by :

This cancels the on the right side, giving

We then divide both sides by to get which cancels the on the left side, leaving just :

Letβs look at an example that uses this form of the equation.

### Example 3: Length of a Solenoid

A solenoid formed from a length of wire has 80 turns. The solenoid carries a constant current of 13 A and the strength of the magnetic field produced is measured to be T at its center. Calculate the length of the solenoid, giving your answer to the nearest centimetre. Use a value of Tβ m/A for .

### Answer

Recall that the equation can be put into a form that relates the variables to the length of a solenoid:

Letβs substitute the values we are given into this form of the equation. The current is 13 A, the number of turns is 80, the magnetic field strength at the center is T, and the permeability of free space is Tβ m/A. This gives us

Multiplying across the numerator, the units of amperes cancel, leaving just Tβ m:

Dividing these numbers cancels the teslas, leaving behind only metres:

So, the length of this solenoid is 0.179 metres. We are not done yet though, as we want the final answer of the problem in centimetres.

To put this answer in centimetres, recall that there are 100 centimetres in 1 metre:

Multiplying this by our answer in metres will give us the answer in centimetres:

So, rounding to the nearest centimetre, this solenoid has a length of 18 centimetres. The answer is 18 cm.

Recall that the length of a solenoid is inversely proportional to the magnetic field strength at its center. A longer length can be counteracted by adding more turns in the wire, as seen in the diagram below.

Both solenoids have the same magnetic field strength since the longer solenoid has a proportionally larger amount of turns. We can also see that the longer solenoid is essentially the same as the first, but there is just more of it.

This means that adding more wire turns, making a solenoid longer in the process, does not increase the magnetic field strength at the center at all. What increases the magnetic field strength is the number of turns over a given length. This is proved by looking at the equation

If we assume that the current is the same for two solenoids, then the only nonconstant variables that affect the magnetic field strength are the number of turns and the length :

We can see that doubling the turns to and the length to does not change this proportion at all. The doubled values cancel each other out:

To simplify the equation, this proportion is often condensed to a simple lowercase , the units of which are turns per unit of length. Inside the full equation, this looks as follows.

### Equation: Magnetic Field at the Center of a Solenoid with Turns per Unit Length

The magnetic field strength, , inside the center of a solenoid is found using the equation where is the current of the solenoid, is the number of turns per unit of length, and is the permeability of free space, Tβ m/A.

The units of are expressed per unit of length. For example, consider the solenoid in the diagram below.

The value of is the total turns over the total length:

So, 6 turns and 3 cm of length gives

If we were to double the turns to 12 and double the length to 6 cm, we would see the value of is still the same

Only by changing the proportion of turns to the length of the solenoid will the magnetic field strength change.

Letβs look at an example.

### Example 4: Magnetic Field Changes in a Solenoid

A length of wire is formed into a solenoid with turns of wire per millimetre. The wire carries a constant current . As a result, a magnetic field of strength can be measured at the center of the solenoid. Which of the following changes to the system would increase the magnetic field strength at the center of the solenoid, assuming everything else remains constant?

- Decreasing the length of the solenoid by removing turns of wire while keeping constant
- Decreasing , the current in the wire
- Decreasing , the number of turns of wire per millimetre
- Increasing , the current in the wire
- Increasing the length of the solenoid by adding turns of wire while keeping constant

### Answer

Letβs recall the form of the equation with turns per unit of length:

If does not change in this equation, the magnetic field strength does not change. Adding or removing parts of the solenoid, but keeping the constant, means the magnetic field strength stays the same.

Decreasing , however, will decrease the magnetic field strength. Likewise, decreasing the current will also decrease the magnetic field strength. This is because magnetic field strength is directly proportional to both and .

The only way to increase the magnetic field strength is by increasing or . The only answer with this increase is D, increasing .

The correct answer is D, increasing the current in the wire will increase the magnetic field strength.

When using to perform calculations, turns are unitless, so the units of are just per unit of length. This means that though we would say 5 turns per metre, inside of an equation we would just write

Letβs look at an example.

### Example 5: Magnetic Field Strength at the Center of a Solenoid

A wire that carries a constant current of 0.15 A is formed into a solenoid with 11 turns per centimetre. Calculate the strength of the magnetic field at the center of the solenoid. Give your answer in teslas expressed in scientific notation to one decimal place. Use a value of Tβ m/A for .

### Answer

The solenoid looks like the diagram below.

Recall the equation for magnetic field strength at the center of a solenoid using turns per unit length:

Before substituting in the values into this equation, we need to make sure the units match. Permeability of free space uses metres, so we need to put in terms of metres as well.

The value of is 11 turns per centimetre, and there are 100 centimetres in 1 metre:

Multiplying this relation by 11 turns per centimetre will turn it in to turns per metre:

Now, we can substitute the values into the equation. The current is 0.15 A, is 1βββ100 turns per metre, and is Tβ m/A. This gives us

Multiplying the permeability of free space into the turns per metre cancels the metres, leaving behind

Multiplying the last two numbers together cancels the units of amperes, leaving teslas to give

So, rounded to one decimal place, the magnetic field strength at the center of this solenoid is T.

Just like with the other version of the magnetic field strength equation, we can isolate specific unknown variables. For example, if we are given a solenoid with an unknown current, we can determine it by putting the equation in terms of .

To do so, letβs divide both sides by :

This cancels the on the right side, leaving behind only :

Letβs look at an example that uses this form of the equation.

### Example 6: Current Determination in a Solenoid With Turns per Length

A solenoid is formed of a length of wire that carries a constant current . The solenoid has 430 turns of wire per metre. The magnetic field at the center of the solenoid is measured to be T. Calculate the current, , in amperes. Give your answer to 1 decimal place. Use .

### Answer

Recall that the equation can be put in terms of as follows:

Using this form, letβs substitute in the known values. Magnetic field strength is T, is 430 turns per metre, and is Tβ m/A. This gives us

Multiplying across the denominator removes the units of metres, giving

Dividing by a fraction is the same as multiplying by its reciprocal. This means the only unit after the division will be amperes:

So, when dividing the numbers, the answer becomes

Rounded to the nearest decimal place, the answer is 5.9 A.

Letβs summarize what we have learned in this explainer.

### Key Points

- A solenoid is a wire arranged in a series of turns or loops.
- When a solenoid carries a current, it produces a magnetic field that is strongest in the center of its loops.
- Within the solenoid loops, the magnetic field strength is given by the equation where is the number of turns in the solenoid, is the current in the solenoid, is the length of the solenoid, and is the permeability of free space, Tβ m/A.
- The equation for magnetic field strength at the center of a solenoid using turns per unit of length is where is the number of turns per unit of length, is the current of the solenoid, and is the permeability of free space, Tβ m/A.