When you need to scale a low-voltage sensor signal to match a microcontroller's ADC range, the non-inverting operational amplifier is the standard bench solution. To design this circuit, you need an op amp calculator based on the non-inverting gain formula. This guide provides the exact mathematical model, defines every symbol, and walks through real-world worked examples with strict unit tracking so you can design, troubleshoot, and verify your analog front ends without guessing.
The Non-Inverting Op Amp Gain Formula & Symbol Table
The foundational equation for a non-inverting amplifier assumes an ideal operational amplifier operating in its linear region with negative feedback. The formula calculates the output voltage based on the input voltage and the ratio of the feedback network resistors.
Vout = Vin × (1 + (Rf / Ri))
Symbol Definition Table
| Symbol | Parameter | Standard Unit | Practical Notes |
|---|---|---|---|
Vout |
Output Voltage | Volts (V) | Constrained by the op-amp's positive and negative supply rails. |
Vin |
Input Voltage | Volts (V) | Applied to the non-inverting (+) terminal. |
Av |
Voltage Gain | Dimensionless (V/V) | Calculated as 1 + (Rf / Ri). Always ≥ 1. |
Rf |
Feedback Resistor | Ohms (Ω) | Connects from the output pin back to the inverting (-) pin. |
Ri |
Input/Ground Resistor | Ohms (Ω) | Connects from the inverting (-) pin to ground. |
When This Formula Applies (and Its Assumptions)
This formula relies on the ideal op-amp model. It assumes infinite open-loop gain, infinite input impedance (meaning zero current flows into the + and - input pins), and zero output impedance. In practice, this math holds true for precision op-amps like the OPA333 or standard workhorses like the LM358, provided two strict conditions are met:
- Negative feedback is intact: The output must be physically connected back to the inverting (-) input through
Rf. - The op-amp is in its linear region: The calculated
Voutmust not exceed the physical voltage supply rails (VCCandVEEor GND). If the math demands 6V but your supply is 5V, the formula breaks and the output saturates.
Rearranged Forms: Solving for Any Variable
On the bench, you rarely know all variables. Usually, you have a target gain and a known input, and you need to select standard E24 resistor values. Here are the algebraically rearranged forms of the op amp calculator formula, solved for each individual variable.
- Solving for Feedback Resistor (
Rf):
Rf = Ri × ((Vout / Vin) - 1) - Solving for Ground Resistor (
Ri):
Ri = Rf / ((Vout / Vin) - 1) - Solving for Input Voltage (
Vin):
Vin = Vout / (1 + (Rf / Ri)) - Solving for Gain (
Av):
Av = Vout / Vin
Worked Examples: Unit Tracking & Realistic Magnitudes
Abstract formulas cause wiring errors. Below are two common bench scenarios solved with strict unit tracking to demonstrate how to use the rearranged forms in practice.
Problem 1: Scaling a DAC Output for an ESP32 ADC
Scenario: You have a legacy 0–1.2V DAC signal, but your ESP32 microcontroller requires a 0–3.3V signal to maximize its 12-bit ADC resolution. You have a 10 kΩ resistor in your parts bin for Ri. What value do you need for Rf?
- Identify knowns:
Vin(max)= 1.2 V,Vout(max)= 3.3 V,Ri= 10,000 Ω. - Select the rearranged formula:
Rf = Ri × ((Vout / Vin) - 1) - Substitute values with units:
Rf = 10,000 Ω × ((3.3 V / 1.2 V) - 1) - Calculate the ratio (units cancel): 3.3 V / 1.2 V = 2.75 (Dimensionless Gain)
- Subtract 1: 2.75 - 1 = 1.75
- Multiply by
Ri: 10,000 Ω × 1.75 = 17,500 Ω - Convert to standard notation: 17.5 kΩ.
Bench Reality: 17.5 kΩ is not a standard 1% E96 resistor value, but 17.4 kΩ is. Using 17.4 kΩ yields a maximum output of 3.288 V, which is perfectly safe for the ESP32's 3.3V limit.
Problem 2: Reverse-Calculating a Thermocouple Signal
Scenario: You are debugging an industrial sensor board. The schematic shows Rf = 47 kΩ and Ri = 2.2 kΩ. Your multimeter reads 3.15 V at the op-amp output pin. What is the actual voltage the thermocouple is generating at the input?
- Identify knowns:
Rf= 47,000 Ω,Ri= 2,200 Ω,Vout= 3.15 V. - Select the rearranged formula:
Vin = Vout / (1 + (Rf / Ri)) - Calculate the resistor ratio: 47,000 Ω / 2,200 Ω = 21.3636
- Add 1 to the ratio: 1 + 21.3636 = 22.3636 (This is the circuit's Gain,
Av) - Divide
Voutby Gain: 3.15 V / 22.3636 = 0.14085 V - Convert to millivolts: 140.85 mV.
The thermocouple is generating approximately 141 mV, which correlates to a specific temperature depending on the thermocouple type (e.g., Type K).
Critical Unit Mistakes & Saturation Limits
An op amp calculator is only as good as the physical constraints you apply to it. Here is where the math diverges from reality on the workbench.
The Unit Cancellation Trap
Because the formula relies on the ratio of Rf to Ri, the units cancel out. You can use 47 kΩ and 2.2 kΩ, or 47,000 Ω and 2,200 Ω—the gain is identical. The mistake happens when you solve for a missing resistor. If the formula outputs 22000, and you blindly write "22000" on your bill of materials without appending the base unit (Ω), a purchasing system might interpret it as 22,000 kΩ (22 MΩ). Always track your base units through the final step and convert to kΩ or MΩ explicitly for BOM entry.
Realistic Answer Magnitudes & Rail Saturation
A common beginner mistake is trusting the calculator when it outputs a voltage that the physical silicon cannot produce. According to Texas Instruments' Op-Amp design guidelines, standard bipolar op-amps (like the classic LM324 or LM358) cannot swing their output all the way to the supply rails.
- Standard Op-Amp (e.g., LM358 on a 5V single supply): The realistic maximum
Voutis roughlyVCC - 1.5V. If your calculator says 4.8V, the physical output will clip and saturate at ~3.5V. - Rail-to-Rail Output (RRO) Op-Amp (e.g., MCP6001 on a 5V supply): Can swing to within 10-20 mV of the rails. A calculated 4.8V will yield a realistic ~4.98V.
Always check your op-amp's datasheet for the "Output Voltage Swing" specification. If your calculated Vout exceeds this parameter under your specific load conditions, you must either increase the supply voltage, choose an RRO op-amp, or lower your target gain.
Op Amp Calculator FAQ
Can an op amp calculator be used for inverting amplifier circuits?
No. The non-inverting formula provided here assumes the signal enters the positive (+) terminal, resulting in a gain that is always 1 or greater (Av ≥ 1). An inverting amplifier routes the signal through a resistor into the negative (-) terminal, grounding the positive terminal. The inverting gain formula is Av = - (Rf / Rin). Note that the inverting configuration can produce fractional gains (e.g., 0.5x) and always introduces a 180-degree phase shift (the negative sign), which the non-inverting calculator does not account for.
Why does my physical op amp output clip when the calculator says it shouldn't?
If your math is correct but the oscilloscope shows a flat-topped sine wave or a stuck DC voltage, you have hit output saturation. This happens when the calculated Vout demands more voltage than the op-amp's power supply can provide. As noted in All About Circuits' semiconductor theory guides, an op-amp cannot generate voltage out of thin air; it can only regulate the voltage provided to its VCC and VEE pins. Verify your supply rails with a multimeter and check the datasheet for the maximum output swing specification.
What is the minimum gain for a non-inverting op amp configuration?
The absolute minimum gain for a standard non-inverting amplifier is 1 (Unity Gain). This occurs when Rf is 0 Ω (a direct wire from output to inverting input) and Ri is infinite (open circuit/disconnected). In this configuration, known as a voltage follower or unity-gain buffer, Vout exactly equals Vin. You cannot use this topology to attenuate a signal (e.g., achieve a gain of 0.5); for attenuation, you must use a resistive voltage divider before a unity-gain buffer.
How do input bias currents affect my op amp calculator results?
The ideal formula assumes zero current flows into the op-amp's input pins. In reality, bipolar op-amps (like the LM358) require a small "input bias current" (typically 20 nA to 250 nA) to bias their internal transistors. If your Ri and Rf values are extremely high (e.g., in the mega-ohm range), this tiny current flowing through the feedback network creates an unintended voltage drop, introducing a DC offset error at the output. To minimize this, keep your feedback resistor values below 100 kΩ when using bipolar op-amps, or switch to a CMOS/JFET op-amp (like the TLV2372) which boasts picoamp-level bias currents, rendering the error negligible.






