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

  1. Select the DAC resolution (bits).
  2. Enter reference voltage and (optional) output gain.
  3. Choose output mode (Unipolar or Bipolar).
  4. Enter a code to get voltage, or enter a voltage to compute the nearest code.
Output Readout
Ideal math model (no INL/DNL unless you add it later).
Vout
Code
LSB
FSR
Status:
DAC Level
Enter inputs to see the output level.
Inputs & Settings
Choose mode, enter resolution + Vref, then convert code ↔ voltage.
Common: 8, 10, 12, 14, 16
Examples: 1.024V, 2.5V, 3.3V, 5V
Use 1 for direct output; some DACs use 2× gain paths.
Valid range depends on bits: 0 … (2^N − 1)
Used when converting Vout → Code (nearest / floor / ceil configurable in JS).
Applies to Vout → Code.

Show Work (step-by-step)
Work is shown using base units (V, codes, LSB) for clarity.

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, where Mid = 2^(N−1)
Note: Real DACs can differ (offset binary vs two’s complement, exact FSR definitions, midscale behavior). This tool labels assumptions in Show Work.

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.