diff --git a/Modules/Learning/Unsupervised/include/otbContingencyTable.h b/Modules/Learning/Unsupervised/include/otbContingencyTable.h
index f41e33725b3e7b142b526a93dee437a573b8fec9..d1996e66a31fbf5253bc488ab3c92a7cce937a88 100644
--- a/Modules/Learning/Unsupervised/include/otbContingencyTable.h
+++ b/Modules/Learning/Unsupervised/include/otbContingencyTable.h
@@ -81,7 +81,7 @@ public:
         }
       }
 
-    int width = static_cast<int>(maxWidth);
+    int width = static_cast<int>(maxWidth)+1;
 
     // Write the first line of the matrix (produced labels)
     o << std::setfill(' ') << std::setw( width ) << "labels";