DAC Output Calculator
Convert a digital code to an ideal DAC output voltage (and back). Includes LSB size, full-scale range, and Show Work.
How to Use
- Select the DAC resolution (bits).
- Enter reference voltage and (optional) output gain.
- Choose output mode (Unipolar or Bipolar).
- Enter a code to get voltage, or enter a voltage to compute the nearest code.
Show Work (step-by-step)
Formulas (Ideal DAC)
Let N be bits, Code be 0…(2^N−1), and FS be full-scale.
- LSB (step size):
LSB = (Vref × Gain) / (2^N − 1)(common unipolar convention) - Unipolar output:
Vout = Code × LSB - Unipolar code from Vout:
Code = Vout / LSB(then apply rounding) - Bipolar (simple signed mapping):
Vout = (Code − Mid) × LSB, whereMid = 2^(N−1)
FAQ
What’s the difference between “2^N” and “2^N − 1” in DAC math?
Many unipolar DACs map Code = 0 to 0V and Code = (2^N − 1) to ~full-scale, so the step size uses (2^N − 1).
Some datasheets define FSR and LSB slightly differently—Show Work calls out which convention is used.
Why doesn’t my measured output match exactly?
Real-world error sources include reference tolerance, gain/offset error, INL/DNL, output load, and noise. This calculator is the ideal baseline.
Does bipolar mode assume offset-binary or two’s complement?
By default, this page uses a simple midscale-centered mapping (offset-binary style). If you want a two’s-complement option, we can add it as a selectable mode in JS.
Tool Info
Last updated:
Updates may include additional DAC coding formats (two’s complement), error modeling, and export options.