Analog-to-digital converters (ADCs) have multiple specifications. Depending on the application, some specifications are more important than others. For instrumentation applications that digitize slowly varying signals, such as strain gauge and temperature sensor signals, DC specifications like offset error, gain error, integral nonlinearity (INL), and differential nonlinearity (DNL) are particularly relevant.
This article focuses on offset and gain error specifications.
ADC Transfer Function
The ideal transfer function for a 3-bit unipolar ADC is shown in Figure 1.

For an ideal ADC, the input-output characteristic is a uniform staircase. Note that each output code represents a small input voltage range equal to one LSB, not a single input value. The first code transition occurs at 0.5 LSB, and each subsequent transition occurs 1 LSB above the previous one. The final transition occurs at FS - 1.5 LSB.
Because a finite number of digital codes represent a continuous range of analog values, the ADC response is a staircase and thus inherently nonlinear. When evaluating certain nonideal effects such as offset error, gain error, and nonlinearity, it is useful to model the ADC transfer function by a straight line that passes through the midpoints of the steps. This line can be expressed as:
Y_linear = (Vin / FS) * 2^N
where Vin is the input voltage and N is the number of bits. As resolution increases, the staircase response approaches this linear model. The line therefore represents the ideal transfer function for an ADC with an infinite number of output codes. In practice, ADC resolution is finite, so the straight line is only a linear approximation of the actual response.
ADC Offset Error and the Transfer Function
Nonideal effects such as internal component mismatch cause the actual ADC transfer function to deviate from the ideal staircase response. Offset error shifts the entire transfer function along the horizontal axis, causing code transition points to move. The purple curve in Figure 2 shows the response of an ADC with +1 LSB offset.

For a 3-bit unipolar ideal ADC, the first transition should occur at 0.5 LSB, changing the output from 000 to 001. In the response above, the ADC changes from 001 to 010 at 0.5 LSB. Ideally, the 001-to-010 transition should occur at 1.5 LSB. Thus the nonideal response is shifted left by 1 LSB relative to the ideal characteristic. This is called a +1 LSB offset error. Considering the linear model of the nonideal response (the orange line in the figure), we also observe that for a 0 V input the system outputs 001, corresponding to a +1 LSB offset. Figure 3 shows the response for an ADC with -1.5 LSB offset error.

Because offset shifts the entire transfer function by the same amount, it can be calibrated by subtracting the offset value from ADC outputs. Offset error is typically determined by measuring the first code transition and comparing it with the corresponding transition of the ideal response. Using the first code transition gives a more accurate measurement, since by definition offset error is the deviation from the ideal response at zero volts input.
ADC Gain Error
After removing offset error, the first transition of the actual response may align with the ideal characteristic. However, this does not guarantee that other transitions will occur at the same input values. Gain error specifies the deviation of the last transition from its ideal value. Figure 4 illustrates the concept of gain error.

Define the point half an LSB below the last transition as the "gain point." After removing offset error, the difference between the ideal gain point and the actual gain point determines the gain error.
In the example above, the nonideal characteristic has a gain error of +0.5 LSB. The orange line is the linear model of the nonideal response. As seen, the measured difference between the gain point and ideal gain point effectively changes the slope of the system linear model. Figure 5 shows the response of an ADC with -1 LSB gain error.

Note that some datasheets define gain error as the vertical difference between the ADC actual gain point and the straight-line model. For the example in Figure 5, this gives the plot shown in Figure 6.

Horizontal and vertical differences produce the same result when the ideal linear model slope is 1.
Example: Finding ADC Gain Error
Assume a 10-bit ADC with full-scale FS = 5 V. The last transition to 0x3FF occurs at 4.995 V. Assume offset error is zero. Calculate the ADC gain error.
The LSB is 4.88 mV for this ADC. Ideally, the last transition should occur at FS - 1.5 LSB = 4992.68 mV. The measured transition occurs at 4995 mV. Therefore, the ADC gain error is -2.32 mV, or -0.48 LSB.
Expressing Gain Error as Full-Scale Error
Using the concepts above, gain error can be defined based on full-scale error, as shown in Figure 7.

In the figure, the actual response is affected by both offset and gain errors. The deviation of the actual last transition from the ideal last transition, expressed as full-scale error, contains both offset and gain errors. To find gain error, subtract offset error from the full-scale error:
Gain Error = Full-Scale Error - Offset Error
This is equivalent to first compensating for offset error, then measuring the deviation of the last transition from the ideal response to obtain the gain error. Note that in the example above the gain error is positive while the offset error is negative, so the full-scale error is smaller than the gain error alone.
Inconsistent Definitions in Some Datasheets
Some ADC specifications are defined inconsistently across datasheets. One confusing inconsistency is the sign convention for offset and gain errors. For example, Microchip and Maxim Integrated use the same sign convention used in this article, but some manufacturers such as STMicroelectronics use the opposite sign convention. Inconsistencies have even been observed between documents from the same manufacturer. Figures 8 and 9 show examples from Texas Instruments that use different sign conventions.


The sign convention used in Figure 9 and throughout this article appears to be more widely accepted in technical literature. Nevertheless, these inconsistencies can cause confusion. If you understand the basic concepts discussed here, you can resolve the ambiguity. For example, if you measure an ADC and observe the first transition occurring above 0.5 LSB, similar to the case described earlier, you should add the appropriate positive correction to ADC readings to compensate for offset error regardless of the specific sign convention used in a particular datasheet.