DevGizmo

DAC Calculator

Calculate output voltage, LSB size and full-scale range for any DAC. Enter an output code to find the exact analogue voltage produced.

Enter your own resolution and reference voltage.

DACN-bitDigital → AnalogCodeVoutVref

LSB Size (voltage step)

0.8059 mV

Full-Scale Count (2ᴺ − 1)

4,095

Max Output Voltage

3.3 V

Formula used

LSB = Vref ÷ (2ᴺ − 1) = 3.3 ÷ 4095 = 0.8059 mV

What is a DAC?

A Digital-to-Analogue Converter (DAC) converts a digital binary number into a proportional analogue voltage. DACs are used to generate audio signals, control motor speed, set reference voltages for comparators, and drive analogue actuators from a microcontroller or DSP. Common examples include the MCP4725 (I²C, 12-bit) and the DAC8552 (SPI, 16-bit).

DAC Output Voltage Formula

For a straight-binary unipolar DAC (the most common configuration), the output voltage for a given code is:

Vout = (code ÷ (2ᴺ − 1)) × Vref

At code = 0, Vout = 0 V. At code = 2ᴺ − 1 (full scale), Vout = Vref. The Least Significant Bit (LSB) voltage step equals Vref ÷ (2ᴺ − 1).

Resolution and LSB Size

A 12-bit DAC has 4096 discrete output levels (codes 0–4095). With a 3.3 V reference, the LSB is approximately 0.8059 mV — the smallest output voltage change achievable. A 16-bit DAC (65535 steps at 5 V) gives an LSB of just 76.3 µV, suitable for precision instruments and audio applications.

Firmware Example

In embedded firmware, converting a desired voltage to a DAC code follows the inverse formula:

uint16_t code = (uint16_t)((voltage / Vref) * (pow(2, N) - 1));

Supported Chip Presets

Select a chip preset to auto-fill resolution and reference voltage: MCP4725 (12-bit, 3.3 V), MCP4921 (12-bit, 5 V), DAC8552 (16-bit, 5 V), AD5620 (12-bit, 5 V), AD5680 (18-bit, 5 V), and Arduino PWM (8-bit equivalent). Custom configurations are fully supported.