An operational amplifier is a differential amplifier with enormous open-loop gain, typically a hundred thousand or more, and two inputs whose difference it amplifies. Used bare it is a comparator, slamming its output to one supply rail or the other on a whisper of difference. Tamed with negative feedback, a fraction of the output fed back to the inverting input, it becomes the most obedient block in electronics: the feedback network, often just two resistors, sets the gain precisely while the op amp's own excess gain absorbs its imperfections. The golden rules follow: with feedback, the inputs sit at equal voltage and draw essentially no current.
In the non-inverting amplifier the signal enters the positive input and the gain is 1 + Rf/R1, always at least one, never inverting. In the inverting amplifier the signal arrives through R1 to the negative input, the gain is minus Rf/R1, and the output flips the signal upside down; that configuration doubles as a summer, adding several inputs through their own resistors. Gain in decibels is 20 log of the voltage gain, the form filters and audio chains are specified in. The gain calculator handles both configurations and shows the ideal output for a given input, the starting point of any op amp design.
Ideal arithmetic meets three limits. The output cannot pass the supply rails, so a gain of 100 on a 1 volt signal demands at least 100 volts of supply headroom it will never have; clipping is the result. Gain falls with frequency: the gain-bandwidth product is roughly constant, so a chip offering 1 megahertz of unity-gain bandwidth manages only 10 kilohertz at a gain of 100. And inputs have offsets, bias currents and noise that precision circuits must budget. None of this diminishes the device; it defines the craft. Start with the ideal resistor calculation, then check the rails and the bandwidth, in that order, every time. Choosing a real part is the last step of the beginner's education. The catalogue divides by supply range, including the precious rail-to-rail types whose inputs and outputs approach the supplies; by speed, from micropower parts that wake slowly to video amplifiers; and by precision, where offset voltage and drift are bought down with money. A sensible default for general work is a modern dual or quad that runs from a single 5 to 30 volt supply, forgives abuse and costs little, while precision, audio and radio work each pick their specialists. Whatever the part, the two-resistor arithmetic does not change, and neither does the bench ritual: calculate the gain, check the rails, check the bandwidth, then build it and watch it agree.
The free calculator that goes with this guide:
Open the op amp gain calculator