INT8 Quantization Tool

INT8 Quantization Calculator

Quantize a decimal value to signed INT8 using a scale and zero point. Calculate the integer code, 8-bit binary representation, dequantized value and resulting quantization difference.

Signed INT8 -128 to 127 Scale Zero Point 8-Bit Output
INT8 Quantization Signed 8-bit
Enter the floating-point value to quantize.
Scale must be greater than zero.
Signed INT8 zero point from -128 to 127.
q = round(real value / scale) + zero point
q is clamped to the signed INT8 range -128 to 127.
INT8 Quantization Result
Input Value
INT8 Value
8-Bit Binary
Hexadecimal
Scale
Zero Point
Dequantized Value
Difference

What Is INT8 Quantization?

INT8 quantization maps a real-valued number to a signed 8-bit integer. A signed INT8 value can contain any whole number from -128 through 127.

Instead of storing the original floating-point value directly, the quantized representation stores an integer code together with scale and zero-point parameters that define how the integer corresponds to the real numerical range.

INT8 Quantization Formula

The basic affine quantization equation used by this calculator is:

q = round(x / scale) + zero_point

Here, x is the original real value and q is the resulting signed INT8 integer. After rounding, the value is limited to the valid range from -128 through 127.

To estimate the represented real value again, dequantization uses:

x’ = (q – zero_point) × scale

INT8 Quantization Example

Real value:
1.25

Scale:
0.1

Zero point:
0

1.25 / 0.1 = 12.5

Rounded INT8:
13

Binary:
00001101

Dequantized:
13 × 0.1 = 1.3

The represented value is 1.3 rather than exactly 1.25 because only discrete integer codes are available after quantization.

Signed INT8 Range

Property Value
Storage width 8 bits
Minimum -128
Maximum 127
Total integer codes 256
Negative representation Two’s complement

What Does Scale Mean?

The scale determines how much real-value distance exists between neighboring quantized integer codes. A smaller scale represents finer numeric steps, while a larger scale represents larger steps.

Scale = 0.1

One INT8 step represents:
0.1 real-value units

The scale must always be greater than zero.

What Is the Zero Point?

The zero point is the quantized integer code associated with real zero in affine quantization.

Scale = 0.1
Zero point = 5

Real value 0:
round(0 / 0.1) + 5
= 5

The zero point is useful when the quantized integer range and the represented real range are not centered around zero.

INT8 Clamping

If the calculated integer is greater than 127, it cannot be stored in signed INT8 and is clamped to 127. Values below -128 are similarly clamped to -128.

Calculated q = 145

INT8 maximum = 127

Stored q = 127

Clamping prevents the quantized integer from exceeding the signed 8-bit storage range.

INT8 Binary Representation

The resulting quantized integer is displayed as a complete 8-bit binary value. Negative INT8 values use two’s-complement representation.

INT8 decimal:
-5

8-bit two’s complement:
11111011

Why INT8 Quantization Is Used

Lower Storage

An INT8 value requires only one byte, which can substantially reduce numerical data storage compared with wider floating-point representations.

Lower Memory Traffic

Smaller numerical representations reduce the amount of data that must be moved between memory and compute units.

Integer Computation

Compatible processors and accelerators can use efficient low-precision integer arithmetic for quantized workloads.

AI Inference

INT8 quantization is commonly associated with optimized machine-learning inference where reduced precision is acceptable.

Important INT8 Quantization Notes

Important: this calculator performs signed INT8 affine quantization only.

The INT8 output range is -128 through 127.

The scale must be greater than zero.

The zero point must itself fit within the signed INT8 range.

Quantization requires rounding because a real value may fall between two integer codes.

If the calculated result exceeds the INT8 range, it is clamped to -128 or 127.

The dequantized value is an approximation represented by the resulting INT8 code; it does not create additional precision.

INT8 Quantization Calculator FAQs

What is INT8 quantization?
INT8 quantization maps real-valued numbers to signed 8-bit integer codes ranging from -128 through 127.
What formula does this calculator use?
It uses q = round(x / scale) + zero point and then clamps q to the signed INT8 range.
What is the signed INT8 range?
Signed INT8 ranges from -128 through 127.
What does scale do?
Scale determines the real-value distance represented by one step between neighboring integer codes.
What is a zero point?
The zero point is the quantized integer code corresponding to real zero in affine quantization.
Why must the quantized value be rounded?
The output must be an integer, so values falling between integer codes must be mapped to one of the available whole-number codes.
What happens if the result exceeds 127?
It is clamped to 127, the maximum signed INT8 value.
What happens if the result is below -128?
It is clamped to -128, the minimum signed INT8 value.
Why is the dequantized value different from the input?
Quantization maps continuous or high-precision values onto a limited number of discrete integer levels, so some approximation is normally introduced.
Does this calculator perform INT4 quantization?
No. This page handles signed INT8 quantization only.
Scroll to Top