# Space Efficiency by 2D Data Matrix and QR Code barcodes

Space on paper, screen and other media is quite valuable and should be used sparingly. Some barcodes pack information more efficiently and take up less space than others. In practice, the question arises: for a given amount of information, how much space does a particular barcode format use?

The size of a two-dimensional barcode is measured in the number of grid modules along each side. Each grid module can be either on (black) or off (white). The size of each module is called â€śX sizeâ€ť (English â€śX Sizeâ€ť). Each scanner has a minimum â€śX sizeâ€ť that it can read. This parameter is independent of the type of barcode being read. The total size of the barcode will be calculated as the product of "X size" and the number of modules.

Under the cut translation of a fragment of the report of the company Semacode on the choice of the optimal format of a two-dimensional barcode for mobile applications.
')

An independent group (R9 Automatic Data Capture group) of the Consumer Electronics Association published a comparison of the Data Matrix and QR Code for the development of the IEC 62090 specification (â€śLabeling of packaging of goods using bar codes and two-dimensional symbolsâ€ť). The main conclusion - Data Matrix most effectively uses the space among all two-dimensional characters.

The CEA document lists four specific examples that we summarize in the table:
QR CodeData matrixSpace saving
Example 142 Ă— 4224 Ă— 2467%
Example 2425 Ă— 2518 Ă— 1848%
Example 329 Ă— 2920 Ă— 2052%
Example 4 *29 Ă— 2926 Ă— 2620% *
* In the last example, Kana characters are encoded. QR Code has been specifically designed to efficiently encode these characters, and even in this example it is less efficient than the Data Matrix.

Let's compare the effectiveness of two formats using independently developed generators:
QR CodeData matrixSpace saving
â€śHttp://en.wikipedia.org/wiki/Semapediaâ€ť29 Ă— 2924 Ă— 2432%

Independent and our analyzes show that Data Matrix uses 30% to 60% less space than QR Code.

##### Example

Both barcodes contain the text â€śhttp://google.comâ€ť. Data Matrix is â€‹â€‹61% smaller.

##### Minimum size

For a small amount of data, the minimum barcode size is important to save space. The minimum size of QR Code is 21 Ă— 21, the Data Matrix is â€‹â€‹10 Ă— 10 modules (77% less).