The SRBs are pretty close to burnout when they separate:
SRB separation is initiated when the three solid rocket motor chamber pressure transducers are processed in the redundancy management middle value select and the head- end chamber pressure of both SRBs is less than or equal to 50 psi. A backup cue is the time elapsed from booster ignition.
The separation sequence is initiated, commanding the thrust vector control actuators to the null position and putting the main propulsion system into a second-stage configuration (0.8 second from sequence initialization), which ensures the thrust of each SRB is less than 100,000 pounds. Orbiter yaw attitude is held for four seconds, and SRB thrust drops to less than 60,000 pounds.
So at separation, thrust is down to 1.8% of the initial value. Here's a graph that shows the thrust profile:
At liftoff, the entire propellant surface burns and provides thrust. The propellant is cast (mostly *) with a cone-shaped hole down the middle. At the point where the cone is widest, the layer of propellant is thinnest, and at this location the burn time is the shortest. So the SRBs will gradually reduce thrust for a while before separation.
To get a rough approximation of the amount of fuel remaining:
Thrust in an SRB is related to the propellant area that's burning.
If you were to coat the inside of an empty SRB casing with a thin layer of propellant, you'd get something close to takeoff performance (3.3 million lbs thrust).
If you're down to 1.8% of nominal thrust, that means most of the casing is now bare, and about 1.8% is still covered by propellant.
I'm going to make the following assumptions:
- length of the propellant stick is 40 m
- diameter is 3.7 m
- the SRB is filled with propellant in a simple negative cone shape
The angle of the cone will then be 2.6°, and the length from top to bottom along the inside of the cone will be 40.04 m.
Now we'll remove propellant until 1.8% of the propellant area is left; the length is then 40.04 * .018 is 72 cm. Thickness at the top is 3.3 cm. This is equal to a hollowed-out cylinder with a height of 36 cm and a thickness of 1.65 cm.
The volume of that is: 0.056 $m^3$, or (density is 2 kg/dm$^3$) ca. 100 kg. That's down from an initial propellant mass of 500 tons. According to the graph, the SRBs separate 2-3 seconds before they burn out.
These won't be very accurate figures. I've taken a number of shortcuts. I've used the length of the cone as a proxy for its internal area. I've ignored the exact shape of the propellant and just assumed a regular cone. So I might be several hundred kg off.
Approaching the problem from another angle: the SRBs burn 4.16 tons of propellant per second at full blast, so about 1/20 that, or 200 kg/s at separation, decreasing to 0 in 3 seconds, or 100 kg/s average for a total of 300 kg.
So the amount of propellant left at separation is 0.02% or 0.06% of what the SRB started with. Or something in between, probably.
As Russell notes in his comment, you could use more complex methods to get a more accurate answer.
note: I was unable to find a source that listed the propellant mass at separation. The above is an attempt to get to the answer from first principles.
*: yes, I know one section of the SRB is cast with a more complex pattern, but that pattern is gone a while before burnout so for this question I'll ignore it.
Edit:
In this video taken by cameras on board the boosters, you can see flames coming out of the nozzles until at least 16 seconds after separation. The first 6 seconds, the flame is pretty solid but reducing rapidly, after that the flame becomes uneven.