{
  "id": "op-amp-gain",
  "slug": "op-amp-gain-calculator",
  "url": "https://electronics.tools/tools/op-amp-gain-calculator/",
  "name": "Op-Amp Voltage and Gain Calculator",
  "group": "amp-timing",
  "summary": "Vout = V2·R4/(R3+R4)·(1+R2/R1) − V1·R2/R1. Equal 10 kΩ, 1 V and 1.5 V is 0.5 V.",
  "formulas": [
    {
      "id": "vout",
      "label": "Ideal closed-loop Vout",
      "plain": "Vout = V2 · R4/(R3+R4) · (1 + R2/R1) − V1 · R2/R1",
      "mathml": "<math display=\"block\" xmlns=\"http://www.w3.org/1998/Math/MathML\" aria-label=\"Vout = V2 · R4/(R3+R4) · (1 + R2/R1) − V1 · R2/R1\"><mrow><msub><mi>V</mi><mtext>out</mtext></msub><mo>=</mo><msub><mi>V</mi><mn>2</mn></msub><mo>⋅</mo><mfrac><msub><mi>R</mi><mn>4</mn></msub><mrow><msub><mi>R</mi><mn>3</mn></msub><mo>+</mo><msub><mi>R</mi><mn>4</mn></msub></mrow></mfrac><mo>⋅</mo><mrow><mo>(</mo><mrow><mn>1</mn><mo>+</mo><mfrac><msub><mi>R</mi><mn>2</mn></msub><msub><mi>R</mi><mn>1</mn></msub></mfrac></mrow><mo>)</mo></mrow><mo>-</mo><msub><mi>V</mi><mn>1</mn></msub><mo>⋅</mo><mfrac><msub><mi>R</mi><mn>2</mn></msub><msub><mi>R</mi><mn>1</mn></msub></mfrac></mrow></math>",
      "symbols": [
        "Vout",
        "V2",
        "R4",
        "R3",
        "R2",
        "R1",
        "V1"
      ],
      "sources": [
        "sedra"
      ]
    },
    {
      "id": "clip",
      "label": "Rail clip",
      "plain": "Clip to [V−, V+]",
      "mathml": "<math display=\"block\" xmlns=\"http://www.w3.org/1998/Math/MathML\" aria-label=\"Clip to [V−, V+]\"><mrow><msub><mi>V</mi><mtext>clip</mtext></msub><mo>=</mo><mtext>min</mtext><mrow><mo>(</mo><mrow><msub><mi>V</mi><mo>+</mo></msub><mo>,</mo><mtext>max</mtext><mrow><mo>(</mo><mrow><msub><mi>V</mi><mo>-</mo></msub><mo>,</mo><msub><mi>V</mi><mtext>out</mtext></msub></mrow><mo>)</mo></mrow></mrow><mo>)</mo></mrow></mrow></math>",
      "symbols": [
        "Vp",
        "Vn",
        "Vout"
      ],
      "sources": [
        "sedra"
      ]
    },
    {
      "id": "sat",
      "label": "Saturation",
      "plain": "Saturated when ideal is beyond the rails",
      "mathml": "<math display=\"block\" xmlns=\"http://www.w3.org/1998/Math/MathML\" aria-label=\"Saturated when ideal is beyond the rails\"><mrow><mtext>sat</mtext><mo>=</mo><mrow><mo>(</mo><mrow><msub><mi>V</mi><mtext>out</mtext></msub><mo>&lt;</mo><msub><mi>V</mi><mo>-</mo></msub></mrow><mo>)</mo></mrow><mo>∨</mo><mrow><mo>(</mo><mrow><msub><mi>V</mi><mtext>out</mtext></msub><mo>&gt;</mo><msub><mi>V</mi><mo>+</mo></msub></mrow><mo>)</mo></mrow></mrow></math>",
      "symbols": [
        "Vout",
        "Vn",
        "Vp"
      ],
      "sources": [
        "sedra"
      ]
    }
  ],
  "variables": [
    {
      "symbol": "preset",
      "name": "Preset",
      "unit": "1",
      "role": "input",
      "precision": {
        "sig": 1
      },
      "default": "differential",
      "urlParam": "preset"
    },
    {
      "symbol": "V1",
      "name": "Inverting input",
      "unit": "V",
      "role": "input",
      "precision": {
        "sig": 4
      },
      "default": 1,
      "urlParam": "v1"
    },
    {
      "symbol": "V2",
      "name": "Non-inverting input",
      "unit": "V",
      "role": "input",
      "precision": {
        "sig": 4
      },
      "default": 1.5,
      "urlParam": "v2"
    },
    {
      "symbol": "R1",
      "name": "Inverting gain resistor",
      "unit": "Ω",
      "role": "input",
      "precision": {
        "sig": 4
      },
      "range": {
        "min": 0,
        "note": "R1 must be > 0"
      },
      "default": 10000,
      "urlParam": "r1"
    },
    {
      "symbol": "R2",
      "name": "Feedback",
      "unit": "Ω",
      "role": "input",
      "precision": {
        "sig": 4
      },
      "range": {
        "min": 0
      },
      "default": 10000,
      "urlParam": "r2"
    },
    {
      "symbol": "R3",
      "name": "+input series",
      "unit": "Ω",
      "role": "input",
      "precision": {
        "sig": 4
      },
      "range": {
        "min": 0
      },
      "default": 10000,
      "urlParam": "r3"
    },
    {
      "symbol": "R4",
      "name": "+input to ground",
      "unit": "Ω",
      "role": "input",
      "precision": {
        "sig": 4
      },
      "range": {
        "min": 0
      },
      "default": 10000,
      "urlParam": "r4"
    },
    {
      "symbol": "Vp",
      "name": "Positive rail",
      "unit": "V",
      "role": "input",
      "precision": {
        "sig": 4
      },
      "default": 15,
      "urlParam": "vp"
    },
    {
      "symbol": "Vn",
      "name": "Negative rail",
      "unit": "V",
      "role": "input",
      "precision": {
        "sig": 4
      },
      "default": -15,
      "urlParam": "vn"
    },
    {
      "symbol": "Vout",
      "name": "Ideal output",
      "unit": "V",
      "role": "output",
      "precision": {
        "sig": 4
      }
    },
    {
      "symbol": "Vclip",
      "name": "Clipped output",
      "unit": "V",
      "role": "output",
      "precision": {
        "sig": 4
      }
    },
    {
      "symbol": "sat",
      "name": "Saturated",
      "unit": "1",
      "role": "output",
      "precision": {
        "sig": 1
      }
    },
    {
      "symbol": "G",
      "name": "R2/R1",
      "unit": "1",
      "role": "output",
      "precision": {
        "sig": 4
      }
    },
    {
      "symbol": "div",
      "name": "Non-inverting divider",
      "unit": "1",
      "role": "output",
      "precision": {
        "sig": 4
      }
    }
  ],
  "examples": [
    {
      "id": "diff-10k",
      "title": "Differential 10 kΩ × 4",
      "input": [
        {
          "symbol": "preset",
          "value": "differential",
          "unit": "1",
          "display": "differential"
        },
        {
          "symbol": "V1",
          "value": 1,
          "unit": "V",
          "display": "1 V"
        },
        {
          "symbol": "V2",
          "value": 1.5,
          "unit": "V",
          "display": "1.5 V"
        },
        {
          "symbol": "R1",
          "value": 10000,
          "unit": "Ω",
          "display": "10 kΩ"
        },
        {
          "symbol": "R2",
          "value": 10000,
          "unit": "Ω",
          "display": "10 kΩ"
        },
        {
          "symbol": "R3",
          "value": 10000,
          "unit": "Ω",
          "display": "10 kΩ"
        },
        {
          "symbol": "R4",
          "value": 10000,
          "unit": "Ω",
          "display": "10 kΩ"
        },
        {
          "symbol": "Vp",
          "value": 15,
          "unit": "V",
          "display": "15 V"
        },
        {
          "symbol": "Vn",
          "value": -15,
          "unit": "V",
          "display": "-15 V"
        }
      ],
      "output": [
        {
          "symbol": "Vout",
          "value": 0.5,
          "unit": "V",
          "display": "0.5 V"
        },
        {
          "symbol": "Vclip",
          "value": 0.5,
          "unit": "V",
          "display": "0.5 V"
        },
        {
          "symbol": "sat",
          "value": "no",
          "unit": "1",
          "display": "no"
        },
        {
          "symbol": "G",
          "value": 1,
          "unit": "1",
          "display": "1"
        }
      ],
      "computedBy": "opAmpGain"
    },
    {
      "id": "inv-clip",
      "title": "Inverting 1 kΩ / 47 kΩ clips",
      "input": [
        {
          "symbol": "preset",
          "value": "inverting",
          "unit": "1",
          "display": "inverting"
        },
        {
          "symbol": "V1",
          "value": 0.5,
          "unit": "V",
          "display": "0.5 V"
        },
        {
          "symbol": "V2",
          "value": 0,
          "unit": "V",
          "display": "0 V"
        },
        {
          "symbol": "R1",
          "value": 1000,
          "unit": "Ω",
          "display": "1 kΩ"
        },
        {
          "symbol": "R2",
          "value": 47000,
          "unit": "Ω",
          "display": "47 kΩ"
        },
        {
          "symbol": "R3",
          "value": 1000,
          "unit": "Ω",
          "display": "1 kΩ"
        },
        {
          "symbol": "R4",
          "value": 1000000000,
          "unit": "Ω",
          "display": "1000 MΩ"
        },
        {
          "symbol": "Vp",
          "value": 15,
          "unit": "V",
          "display": "15 V"
        },
        {
          "symbol": "Vn",
          "value": -15,
          "unit": "V",
          "display": "-15 V"
        }
      ],
      "output": [
        {
          "symbol": "Vout",
          "value": -23.5,
          "unit": "V",
          "display": "-23.5 V"
        },
        {
          "symbol": "Vclip",
          "value": -15,
          "unit": "V",
          "display": "-15 V"
        }
      ],
      "computedBy": "opAmpGain"
    }
  ],
  "sources": [
    {
      "title": "Sedra/Smith, Microelectronic Circuits — ideal op-amp superposition",
      "url": "https://global.oup.com/academic/product/microelectronic-circuits-9780190853464",
      "retrieved": "2026-11-02"
    }
  ],
  "datePublished": "2026-11-02T00:00:00+08:00",
  "dateModified": "2026-11-02T00:00:00+08:00",
  "author": {
    "name": "Jasper",
    "url": "https://electronics.tools/about/#jasper"
  },
  "relatedTools": [
    "https://electronics.tools/tools/inverting-op-amp-calculator/",
    "https://electronics.tools/tools/555-timer-calculator/",
    "https://electronics.tools/tools/voltage-divider-calculator/"
  ]
}
