{"success":true,"version":"v1","request":{"tool":"get_calculator_schema","calculator_id":"op-amp-gain"},"result":{"entity_type":"calculator","id":"op-amp-gain","calculator_id":"op-amp-gain","canonical_url":"https://tttkmbb.com/engineering/op-amp-gain","name":"Op-Amp Gain Calculator","title":"Op-Amp Gain Calculator – Inverting, Non-Inverting, Voltage Follower and Differential Amplifier Gain and Output Voltage","category":"engineering","category_name":"Engineering & Automotive","tool_name":"calculate_op_amp_gain","featured_mcp_tool":false,"description":"Computes the voltage gain (as a ratio and in dB) of the four basic operational-amplifier circuits from the feedback and input resistors, and optionally the output voltage for a given input, clipped to the supply rails.","use_when":"You are designing or checking an op-amp stage and need the gain from resistor values, the resistor ratio for a target gain, or the expected output voltage and whether it will saturate.","do_not_use_when":"Frequency response, bandwidth or slew-rate limits matter (this is the ideal DC gain), the circuit is a filter, integrator or instrumentation amplifier, or you only need a passive divider (use voltage-divider).","inputs":[{"name":"configuration","label":"Configuration","type":"enum","required":true,"values":[{"value":"inverting","label":"Inverting amplifier (A = −Rf/Rin)"},{"value":"non_inverting","label":"Non-inverting amplifier (A = 1 + Rf/Rin)","aliases":["noninverting","non-inverting"]},{"value":"voltage_follower","label":"Voltage follower / buffer (A = 1)","aliases":["buffer","follower","unity_gain"]},{"value":"differential","label":"Differential amplifier (Vout = Rf/Rin × (V2 − V1))","aliases":["difference","subtractor"]}],"description":"Basic op-amp circuit topology.","example":"non_inverting"},{"name":"feedback_resistor_ohms","label":"Feedback resistor Rf","type":"number","unit":"Ω","required":false,"max":1000000000000,"exclusive_min":0,"description":"Resistor from the output to the inverting input, in ohms (1 kΩ = 1000). Not needed for the voltage follower.","example":100000},{"name":"input_resistor_ohms","label":"Input resistor Rin","type":"number","unit":"Ω","required":false,"max":1000000000000,"exclusive_min":0,"description":"Resistor from the signal source (inverting) or from the inverting input to ground (non-inverting), in ohms. Not needed for the voltage follower.","example":10000},{"name":"input_voltage_v","label":"Input voltage","type":"number","unit":"V","required":false,"min":-10000,"max":10000,"description":"Optional input voltage (V1 for the differential amplifier); enables the output-voltage result.","example":0.5},{"name":"second_input_voltage_v","label":"Second input voltage V2","type":"number","unit":"V","required":false,"min":-10000,"max":10000,"description":"Differential amplifier only: voltage at the non-inverting side; output = gain × (V2 − input_voltage_v)."},{"name":"supply_voltage_v","label":"Supply voltage (±)","type":"number","unit":"V","required":false,"max":1000,"exclusive_min":0,"description":"Optional symmetric supply magnitude; the output is limited to ±supply_voltage_v (ideal rail-to-rail swing).","example":12}],"outputs":[{"name":"voltage_gain","label":"Voltage gain","type":"number","decimals":4,"description":"Closed-loop gain A = Vout / Vin (negative for the inverting amplifier)."},{"name":"gain_db","label":"Gain","type":"number","unit":"dB","decimals":2,"description":"20 × log10 |A|."},{"name":"output_voltage_v","label":"Output voltage","type":"number","unit":"V","decimals":4,"description":"A × input (or A × (V2 − V1)), clipped to ±supply_voltage_v when a supply is given; only when input_voltage_v is given."},{"name":"output_clipped","label":"Output clipped","type":"boolean","decimals":4,"description":"True when the ideal output exceeded the supply rails and was limited (only when input and supply are given)."},{"name":"input_impedance_note","label":"Input impedance","type":"string","decimals":4,"description":"What impedance the signal source sees in this configuration."},{"name":"phase_inversion","label":"Phase inversion","type":"boolean","decimals":4,"description":"True when the output is inverted relative to the input (inverting amplifier)."},{"name":"formula_used","label":"Formula used","type":"string","decimals":4,"description":"Gain expression for the chosen configuration."}],"input_schema":{"type":"object","properties":{"configuration":{"description":"Basic op-amp circuit topology.","type":"string","enum":["inverting","non_inverting","voltage_follower","differential"],"examples":["non_inverting"]},"feedback_resistor_ohms":{"description":"Resistor from the output to the inverting input, in ohms (1 kΩ = 1000). Not needed for the voltage follower. Unit: Ω.","type":"number","maximum":1000000000000,"exclusiveMinimum":0,"examples":[100000],"x-unit":"Ω"},"input_resistor_ohms":{"description":"Resistor from the signal source (inverting) or from the inverting input to ground (non-inverting), in ohms. Not needed for the voltage follower. Unit: Ω.","type":"number","maximum":1000000000000,"exclusiveMinimum":0,"examples":[10000],"x-unit":"Ω"},"input_voltage_v":{"description":"Optional input voltage (V1 for the differential amplifier); enables the output-voltage result. Unit: V.","type":"number","minimum":-10000,"maximum":10000,"examples":[0.5],"x-unit":"V"},"second_input_voltage_v":{"description":"Differential amplifier only: voltage at the non-inverting side; output = gain × (V2 − input_voltage_v). Unit: V.","type":"number","minimum":-10000,"maximum":10000,"x-unit":"V"},"supply_voltage_v":{"description":"Optional symmetric supply magnitude; the output is limited to ±supply_voltage_v (ideal rail-to-rail swing). Unit: V.","type":"number","maximum":1000,"exclusiveMinimum":0,"examples":[12],"x-unit":"V"}},"additionalProperties":false,"required":["configuration"]},"output_schema":{"type":"object","properties":{"voltage_gain":{"description":"Closed-loop gain A = Vout / Vin (negative for the inverting amplifier).","type":"number"},"gain_db":{"description":"20 × log10 |A|. Unit: dB.","type":"number","x-unit":"dB"},"output_voltage_v":{"description":"A × input (or A × (V2 − V1)), clipped to ±supply_voltage_v when a supply is given; only when input_voltage_v is given. Unit: V.","type":"number","x-unit":"V"},"output_clipped":{"description":"True when the ideal output exceeded the supply rails and was limited (only when input and supply are given).","type":"boolean"},"input_impedance_note":{"description":"What impedance the signal source sees in this configuration.","type":"string"},"phase_inversion":{"description":"True when the output is inverted relative to the input (inverting amplifier).","type":"boolean"},"formula_used":{"description":"Gain expression for the chosen configuration.","type":"string"}}},"formula":"inverting: voltage_gain = −feedback_resistor_ohms / input_resistor_ohms; non_inverting: voltage_gain = 1 + feedback_resistor_ohms / input_resistor_ohms; voltage_follower: voltage_gain = 1; differential (matched resistor pairs): output_voltage_v = feedback_resistor_ohms / input_resistor_ohms × (second_input_voltage_v − input_voltage_v); gain_db = 20 × log10 |voltage_gain|; output_voltage_v = voltage_gain × input_voltage_v limited to ±supply_voltage_v","method":"Ideal op-amp model (infinite open-loop gain and input impedance, zero output impedance), valid while the closed-loop gain is far below the open-loop gain at the signal frequency. Real op-amps swing 1–2 V less than the rails unless rail-to-rail types are used, and the differential amplifier needs R1 = R2 and R3 = R4 for full common-mode rejection.","sources":[{"name":"Wikipedia – Operational amplifier applications","url":"https://en.wikipedia.org/wiki/Operational_amplifier_applications","type":"reference","retrieved_at":"2026-09-24"},{"name":"Wikipedia – Operational amplifier","url":"https://en.wikipedia.org/wiki/Operational_amplifier","type":"reference","retrieved_at":"2026-09-24"}],"freshness":{"type":"static","max_age_seconds":null,"note":"Deterministic formula with fixed constants; results never go stale. Inputs supplied by the caller determine the output."},"examples":[{"name":"Non-inverting, Rf 100 kΩ, Rin 10 kΩ, 0.5 V in, ±12 V supply","inputs":{"configuration":"non_inverting","feedback_resistor_ohms":100000,"input_resistor_ohms":10000,"input_voltage_v":0.5,"supply_voltage_v":12},"expected":{"voltage_gain":11,"gain_db":20.83,"output_voltage_v":5.5,"output_clipped":false,"phase_inversion":false},"url":"https://tttkmbb.com/api/v1/calculate/op-amp-gain?configuration=non_inverting&feedback_resistor_ohms=100000&input_resistor_ohms=10000&input_voltage_v=0.5&supply_voltage_v=12"},{"name":"Inverting, Rf 100 kΩ, Rin 10 kΩ, 0.5 V in","inputs":{"configuration":"inverting","feedback_resistor_ohms":100000,"input_resistor_ohms":10000,"input_voltage_v":0.5},"expected":{"voltage_gain":-10,"gain_db":20,"output_voltage_v":-5,"phase_inversion":true},"url":"https://tttkmbb.com/api/v1/calculate/op-amp-gain?configuration=inverting&feedback_resistor_ohms=100000&input_resistor_ohms=10000&input_voltage_v=0.5"}],"faq":[{"q":"Why is the non-inverting gain never below 1?","a":"The feedback network divides the output before comparing it with the input, so the output must be at least as large as the input; an inverting stage or a passive divider is needed for attenuation."},{"q":"What happens when the output exceeds the supply?","a":"The op-amp saturates near its rail and the signal is clipped; with supply_voltage_v given, the calculator limits the output to ±supply and sets output_clipped."},{"q":"How is the differential amplifier wired?","a":"V1 through Rin to the inverting input with Rf as feedback; V2 through an equal Rin to the non-inverting input with an equal Rf to ground. The output is Rf/Rin × (V2 − V1), and mismatched resistors reduce common-mode rejection."}],"tags":["op amp gain","inverting amplifier","non-inverting amplifier","operational amplifier calculator","voltage follower","differential amplifier"],"related":[{"calculator_id":"voltage-divider","reason":"Passive attenuation with two resistors."},{"calculator_id":"decibel","reason":"Convert the gain between ratio and dB."},{"calculator_id":"resistors-series-parallel","reason":"Build non-standard Rf or Rin values from standard resistors."}],"links":{"html":"https://tttkmbb.com/engineering/op-amp-gain","markdown":"https://tttkmbb.com/engineering/op-amp-gain.md","json":"https://tttkmbb.com/engineering/op-amp-gain.json","api":"https://tttkmbb.com/api/v1/calculate/op-amp-gain","schema":"https://tttkmbb.com/api/v1/calculators/op-amp-gain","openapi":"https://tttkmbb.com/openapi.json","mcp":"https://tttkmbb.com/mcp"},"version":"v1","updated_at":"2026-09-24"},"timestamp":"2026-09-24T03:44:27Z"}