Op-Amp Formulas: Inverting and Non-Inverting
Op-amp gain formulas for the inverting and non-inverting amplifier, voltage follower and the summing amplifier, with worked examples and a table of gains.
The formulas
| Circuit | Gain | Output |
|---|---|---|
| Inverting amplifier | A = −Rf / Rin | Vout = −(Rf / Rin) × Vin |
| Non-inverting amplifier | A = 1 + Rf / Rg | Vout = (1 + Rf / Rg) × Vin |
| Voltage follower | A = 1 | Vout = Vin |
| Summing amplifier (inverting) | — | Vout = −Rf × (V1 / R1 + V2 / R2 + …) |
These are the ideal op-amp formulas, with a high open-loop gain, no input current and negative feedback. The output cannot go beyond the supply rails, and the gain falls at high frequencies because of the gain-bandwidth product of the real device. Rf is the feedback resistor, Rin the input resistor of the inverting circuit and Rg the resistor from the inverting input to ground.
Worked example: inverting amplifier
Rf = 100 kΩ, Rin = 10 kΩ and Vin = 0.5 V.
- A = −100 / 10 = −10
- Vout = −10 × 0.5 = −5 V
Worked example: non-inverting amplifier
Rf = 47 kΩ, Rg = 10 kΩ and Vin = 0.5 V.
- A = 1 + 47 / 10 = 5.7
- Vout = 5.7 × 0.5 = 2.85 V
Gain for a given resistor ratio
| Resistor ratio | Inverting gain | Non-inverting gain |
|---|---|---|
| Rf / R = 1 | −1 | 2 |
| Rf / R = 2 | −2 | 3 |
| Rf / R = 5 | −5 | 6 |
| Rf / R = 10 | −10 | 11 |
| Rf / R = 20 | −20 | 21 |
Frequently asked questions
Why is the inverting gain negative?
The output is 180° out of phase with the input. A positive input gives a negative output.
Can a non-inverting amplifier have a gain below 1?
No. The gain is 1 + Rf / Rg, so it cannot fall below 1. For a smaller gain use an inverting stage or a divider before a follower.
What is a virtual earth?
With negative feedback the inverting input sits at nearly the same voltage as the non-inverting input. In the inverting circuit that is ground, so the input current is set by Vin / Rin.
What limits the output?
The supply voltage, which caps the swing, and the slew rate and gain-bandwidth product, which limit speed.
Related
Resistor FormulasOhm’s Law FormulasCapacitor FormulasElectronics and instrumentation calculatorsThree-Phase Power FormulasPower Factor and the Power TriangleAC Circuit Formulas: Reactance and ImpedanceVoltage Drop Formulas for CablesTransformer Formulas: Current and Fault LevelInduction Motor FormulasLighting Formulas: Lux, Lumens and CandelaBattery Formulas: Capacity and RuntimeSolar PV Formulas: Array Size and StringsEarthing Formulas: Earth Rod and Fault LoopCable Size Formulas: Current and Short-CircuitEnergy and Cost Formulas: kWh and PaybackGenerator Formulas: kVA, Current and FuelUPS Formulas: kVA, DC Current and BatteryHarmonics Formulas: THD and True Power FactorShort-Circuit Formulas: Fault Level by MVAUnbalance Formulas: Voltage and Neutral CurrentMotor Starting Formulas: DOL, Star-DeltaCircuit Breaker Formulas: Rating and TripCooling Formulas: Airflow and Heat LoadHeating Formulas: Energy and Heater PowerPer-Unit Formulas: Base Values and ImpedanceLED Formulas: Resistor Value and PowerConduit Fill Formulas: Percent Fill and SizeLightning Protection Formulas: Rolling SphereTransformer Efficiency and Regulation FormulasPump Formulas: Hydraulic, Shaft and Motor PowerFan Formulas: Air Power and Affinity LawsInductor Formulas: Energy and L/R Time ConstantRMS, Peak and Average Value FormulasResonance Formulas: Frequency, Q, BandwidthMotor Efficiency Formulas: Input and SavingsDemand, Load and Diversity Factor FormulasCable Tray Fill Formulas: Area and Cable CountConductor Resistance Formulas and TemperatureTransmission Line Formulas: Drop and LossesStar-Delta Conversion Formulas for Resistors4-20 mA Loop Formulas: Scaling and ResistorCable Loss Formulas: Power and Annual Cost555 Timer Formulas: Frequency and Duty CycleThévenin and Norton FormulasWheatstone Bridge Formulas: Balance and OutputConductor Force Formulas: Short-Circuit ForcesCT Burden Formulas: Lead Resistance and VAGear and Belt Drive Formulas: Speed and TorqueSkin Effect Formulas: Skin DepthRC Filter Formulas: Cutoff Frequency and GainRectifier Ripple Formulas: Capacitor FilterBuck and Boost Converter Formulas: Duty CycleHeat Sink Formulas: Junction TemperatureBattery Pack Formulas: Series and ParallelMotor Acceleration Time FormulasZener Regulator Formulas: Series ResistorBJT Bias Formulas: Voltage Divider BiasPt100 RTD Formulas: Resistance and TemperatureNTC Thermistor Formulas: Beta EquationFusing Current Formulas: Wire Fuse EstimateFlywheel Formulas: Stored EnergyLinear Regulator Formulas: Power and EfficiencyMOSFET Loss Formulas: Conduction and SwitchingRelay Coil Formulas: Current and ResistorTransformer Inrush Current FormulasBattery Charge Time FormulasWind Turbine Power Formulas: Betz LimitDetuning Reactor Formulas: Capacitor BanksTransformer Tap Changer FormulasCable Pulling Tension FormulasInsulation Resistance Formulas: PI and DARPower Transfer and Power Angle FormulasSolar Panel Temperature Derating FormulasVoltage Change and Flicker FormulasSoft Starter and VFD Sizing FormulasEarth Fault Loop and RCD FormulasBattery Internal Resistance FormulasBusbar Size and Short-Circuit FormulasADC Resolution and Sampling FormulasCapacitor Switching Inrush FormulasCable Charging Current FormulasSolar DC to AC Ratio FormulasMeasurement Uncertainty FormulasParallel Transformer Load Sharing FormulasPeukert Law and Battery Runtime FormulasCapacitor Discharge Time FormulasHydraulic Power and Cylinder Force FormulasThermocouple Voltage FormulasTransformer Vector Group FormulasPower Supply Hold-Up Time FormulasHoist and Lift Power FormulasCompressor Power FormulasRectifier Bridge Sizing FormulasPCB Trace Width and Current FormulasHeat Pump COP FormulasSound Level and dB Addition FormulasDuty Cycle and RMS Load FormulasSupercapacitor Energy FormulasStep and Touch Voltage FormulasContactor Sizing FormulasInverter-Fed Motor Cable FormulasPneumatic Cylinder Force and Air UseBusbar Temperature Rise FormulasMotor Temperature Rise FormulasBattery Storage Round-Trip EfficiencyThermal Time Constant FormulasSolar Charge Controller Sizing FormulasPoint Illuminance FormulasGenerator Droop and Load Sharing FormulasTwo-Wattmeter Method FormulasVFD Braking Resistor FormulasLoad Bank Test FormulasTransformer Cooling Class Rating FormulasEnergy Meter Multiplier FormulasOvercurrent Relay Curve FormulasSingle-Tuned Harmonic Filter FormulasCable Sheath Circulating Current FormulasDifferential Protection Slope FormulasEarth Electrode Spacing FormulasSolar Array Row Spacing FormulasDC Lighting Voltage Drop FormulasTransformer Loss of Life FormulasMotor Start Voltage Dip in the Cable FormulasNeutral Earthing Resistor FormulasCable I²t Withstand Check FormulasMotor Locked-Rotor Code Letter FormulasSynchronous Speed and Pole FormulasBattery C-Rate and Cycle Life FormulasEV Charging Time FormulasConveyor Belt Power FormulasParallel Plate Capacitor FormulasSolenoid and Coil Inductance FormulasPower Factor Correction Payback FormulasTransformer Through-Fault Current FormulasTransformer EMF Equation FormulasDelta-Star Resistor Conversion FormulasCurrent Shunt Resistor FormulasSolar Energy Yield and Degradation FormulasElectrolysis and Faraday’s Law FormulasAGL Series Circuit Load and CCR Sizing FormulasAGL Maximum Fittings on a CCR FormulasAGL Isolating Transformer FormulasAGL CCR Input Power and Energy FormulasAGL Brightness Step FormulasAGL Lamp Life FormulasComplex Number Formulas: Polar and RectangularPhasor Addition Formulas: Sum and DifferencePercentage Error Formulas for MeasurementsTrigonometry Formulas for Electrical EngineersMean and Standard Deviation FormulasQuadratic, Logarithm and Power FormulasPercentage, Ratio and Rounding FormulasProbability, Combinations and Binomial FormulasConversion Centre