How fast does electricity flow?
How fast does electricity flow? This is a good question, because it seems like a simple enough question, but usually it indicates some underlying misconceptions. The first difficulty in answering the question is knowing, what is electricity? Do you mean:
- How fast do changes in electrical fields propagate? or...
- How fast do electrical charge carriers move?
Usually, people asking this question actually care about the former, but are thinking about the latter. However, not having a clear understanding of the difference, their underlying concern actually can't be addressed without stepping back and addressing the underlying misconceptions which lead to the question.
Understand is this: there are forces, and there are things that transmit forces, and they are not the same thing. Here's an example: I'm holding one end of a rope, and you are holding the other end. When I want to get your attention, I tug the rope. There is the rope, and there is the tug. The tug travels as a wave of force down the rope at the speed of sound in the rope. The rope itself will move at some other speed.
Say I have two lookout towers, and when I see the approaching invaders, I shout to the other tower. Sound will travel as waves in the air at the speed of sound. How fast are the molecules in air moving? Do you care?
Some people won't let this go until the motion of the molecules is actually explained, even though it's usually not relevant to their concerns. So here's the answer: the molecules are flying around in all random directions, all the time. They fly around because they have non-zero temperature. Some are very fast. Some are very slow. They bump into each other all the time. It's very random.
When you shout, your vocal tract compresses (and rarefies, as your vocal cords vibrate) some of the air. The molecules in this compressed region want to move to a region with less pressure, so they do. But now this nearby region has too much air, and is a little more compressed than the air around it, so the compressed region expands outward a little more. This wave of compression moves through the air at the speed of sound.
All of this happens superimposed on the random motion of the molecules previously mentioned. It's unlikely that the same molecules that were in your vocal tract will be the ones that vibrate in the listener's ear. If you watch individual molecules, you will observe them going in all directions. Only if you observe a lot of them will you notice that slightly more went in one direction versus another. It is true for all things we would call "sound" that the random motion of the molecules due to thermal noise is much more than their motion due to sound. When the "sound" becomes the more relevant motion, we tend to call it not "sound" but rather an "explosion".
The situation with electricity is not much different. A metal conductor is full of electrons that are free to wander around the entire circuit in random directions, and they do, simply because they are warm. Things in our circuits make waves in this sea of electrons, and these waves propagate at the speed of light1. At the currents we typically encounter in circuits, most of the electron motion is due to thermal noise.
So now we can answer the questions:
How fast do changes in electrical fields propagate? At the speed of light in the medium in which they are propagating. For most cables, this is in the neighborhood of 60% to 90% of the speed of light in a vacuum.
How fast do electrical charge carriers move? The velocities of individual charge carriers are random. If you take the average of all these velocities, you can get some velocity that depends on the charge carrier density, and the current, and the conductor's cross-sectional area, and it's typically less than a few millimetres per second in a copper wire. Above that, resistive losses become high in ordinary metals and people tend to make the wires bigger instead of forcing the charges to move faster.
Further reading: Speed of Electricity Flow by Bill Beaty
1: The speed of light depends on the material in which the light is propagating, just as with sound. See Wave propagation speed.
This is really more of a physics question than an electronics one... The reason being electrical and electronics engineers rarely (if ever) consider such subatomic calculations. The fact that electrons are moving at all is what really matters, how fast they move is of little consequence to the circuit. What may be useful to the engineer is knowing how fast an electric potential (voltage) can change as this will decide the maximum data transmission on a wire (wire speed) which is related to the resistance, capacitance, and inductance of the charge carrier, among other things. This is also associated with the wave propagation speed discussed in some of the other answers. These are two completely different issues...
Electricity Overview
To start, "electricity" doesn't flow. Electricity is the physical manifestation of the flow of electric charge. Although this term applies to a broad spectrum of phenomena, it is most typically associated with the movement (excitation) of electrons - negatively charged subatomic particles. When certain elements are compounded, the electrons can move freely through the outermost layer of the electron cloud from one atom to the next. A conductor easily allows the flow of electrons, while an insulator restricts it. Semiconductors (like silicon) have controllable conductivity, which makes them ideal for use in modern electronics.
As you may know, electric current is measured in amperes (amps). This is really a measurement of how many electrons are moving through a single point in one second:
1 Amp = 1 Coulomb per Second = 6.241509324x10^18 Electrons per Second
As long as there is a voltage (potential) present across a conductor, (a wire, resistor, motor, etc.) current will flow. The voltage is a measurement of the electric potential between two points, so having a higher voltage will allow for a higher current flow, that is, the movement of more electrons through a point per second.
Electron Speed
Of course, the fasted known speed is the speed of light: 3*10^8 m/s. However, electrons typically do not move anywhere near this speed. In fact, you'd be surprised to know how slowly they actually move.
The actual speed of the electron is known as drift velocity. When a current flows, the electrons don't actually move in a straight line though a wire, but sort of jiggle around through the atoms. The actual average speed of the electron flow is proportional to the current using the following formula:
v = I/(nAq) = current / (carrier density * carrier cross-sectional area * carrier charge)
This example is taken from Wikepedia, because I didn't want to look up the numbers myself...
Consider a 3A current flowing through a 1mm diameter copper wire. Copper has a density of 8.5*10^25 electrons/m^3 and the charge of one electron is -1.6*10^(-19) Coulombs. The wire has a cross-sectional area of 7.85*10^(-7) m^2. Hence, the drift velocity would be:
v = (3 Coulombs/s) / (8.5*10^25 electrons/m^3 * 7.85*10^(-7) m^2 * -1.6*10^(-19) Coulombs)
v = -0.00028 m/s
Notice the negative velocity, implying that current actually flows in the opposite direction typically thought. Aside from that, the only thing to notice is how slow this actually is. A current of 3 amps is not that small, and copper wire is an excellent conductor! Actually, the higher the resistance in the charge carrier, the faster the velocity will be. This is similar to how different settings on a shower head will cause the same pressure of water to come out of the faucet at different speeds. The smaller the hole is, the faster the water has to come out!
Making Sense of This
If electrons move so slowly, then how is it possible to transmit data so quickly? Or even, how can a light switch control a light instantaneously from so far away? This is because there is not a single electron that must flow from one point in the circuit to another for anything to work. Actually, there are many free electrons (the amount depends on the elemental make up of the carrier material) in every point of the circuit at all times which move as soon as a great enough potential (voltage) is applied.
Think of water in a pipe. If there is no water in the pipe to begin with, it will take some time for the water to reach the faucet when a spout is turned on. However, in a home, there should already by water in every point of the pipe, so the water flows out of the faucet as soon as it is turned on. It does not have to travel from the water source to the faucet because it is already in the pipe, just waiting for the potential to push it through. It is the same with a wire: there are already so many electrons in the wire, just waiting to be pushed through by the presence of the voltage potential. The speed it would take for one electron to move from one point in the wire to another is completely irrelevant.
On the other hand, the speed of data transmission through a physical medium is important and does have a theoretical maximum, as discussed in this wonderful question and answers so I won't get into that here.
The electrons are misleading you. Ignore them. They go in the wrong direction, anyway. People love to build little animated models that show them moving around - which is true, and observe that electronic communication is near instant - true, and conclude that electrons move near-instantaneously - which is false.
How fast does electricity flow?
There are two possible interpretations: "how fast do electrons move?" and "how fast does an electronic signal travel?"
Kurt has already answered "how fast do electrons move?" with drift velocity. However, electronic signals are defined by the electromagnetic wave propagating through the material with the assistance of the charge carriers. The signal propagates at some fraction of the speed of light, affected by the properties of the transmission line.
This imposes real limitations on high speed systems. In practice it takes about a nanosecond for a signal to propagate along 30cm of PCB. There is a minimum latency between parts of a computer as a result.
Line inductance and capacitance restrict how "sharp" you can make an edge and send it down a line. It will get smeared out towards a sinewave shape.
Note that the amount of data you can put through a carrier is different still, governed by its signal to noise ratio. Propagation speed determines minimum latency, not bandwidth.
Is the speed of an electron different in say a resistor than in a wire?
Does it matter?
From above we know that the answers are "yes" and "no", for speeds of electrons.
Wave propagation speed is affected by capacitance, inductance, and the dielectric constant of both the material you are propagating through and any nearby insulators to ground planes. Therefore a signal will propagate at a very slightly different speed through a resistor than a wire, as it's made of a different material and stands off the board.
Or are the effects of the electron the only important thing, with lower levels of abstraction not useful in practice?
Most of the time, you don't have to worry about electrons. They get involved directly in cathode ray tubes, vacuum fluorescent displays and thermionic "valves".
This is also true of semiconductors, where the physics is hard and sometimes counterintuitive, but the basic knowledge of how to use a transistor, FET or diode in a circuit is much simpler.