GAIN CONTROL
To make the LM386 a more versatile amplifier, two pins (1 and 8 ) are provided for gain control. With pins 1 and 8 open the 1.35 kΩ resistor sets the gain at 20 ( 26 dB ). If a capacitor is put from pin 1 to 8, bypassing the 1.35 kΩ resistor, the gain will go up to 200 ( 46 dB ). If a resistor is placed in series with the capacitor, the gain can be set to any value from 20 to 200 ..
If you neglected the fact that the LM386 isn't ideal opamp, and you just want to calculate gain of the circuit assuming block of ideal opamp, then i think it's easy to get gain of the circuit..
You can start with assuming no input current to the opamp, and that equal voltages are there on positive and negative input terminals of the opamp, and go with it, you will find the gain,
BR
Ahmad,
The variable input resistor is presumably volume control. The overall gain of the amplifier, assuming you leave pins 1 and 8 open, can therefore vary from 0 to 20. As kevinj said previously, the overall gain is 20 (gain of the amplifier) times the voltage divider ratio.