# Determining DC gain of single supply op-amp (no AC component)

I'm building a homebrew PIC programmer, and want to support devices with varying Vpp voltages, so I'm using the DAC output of a PIC16F1825. But the PIC is supplied with a +5V Vdd, so that's the maximum output of the DAC. I can use an opamp to increase that voltage with an available +12V rail using the following circuit (DAC buffer opamp stage not shown):

simulate this circuit – Schematic created using CircuitLab

What has me mystified is how to determine the voltage gain in this circuit apart from trial and error with R1 and R2 values. Ideally, in this case, I'd like a gain of about 2.5 with signals referenced to ground (the real ground, not a virtual one as is typical in single supply AC amplifiers).

For normal dual-supply AC amps, I have a formula of 1+(R2/R1), but that doesn't seem to be valid here.

So my question is: is there a formula to determine the gain produced with a given R1 and R2 or, conversely, to determine R1 and R2 to produce a given gain?

(I could probably accomplish this with a simple transistor, but since I need the DAC buffer anyway, I have a spare opamp available)

It's perfectly valid; $\dfrac{V_O}{V_I} = 1+\dfrac{R_2}{R_1}$