diff --git generic/tclStringRep.h generic/tclStringRep.h
index c0adc109f..eb7c5a8ea 100644
--- generic/tclStringRep.h
+++ generic/tclStringRep.h
@@ -65,7 +65,7 @@ typedef struct String {
 } String;
 
 #define STRING_MAXCHARS \
-    (int)(((size_t)UINT_MAX - 1 - TclOffset(String, unicode))/sizeof(Tcl_UniChar))
+    (int)(((size_t)UINT_MAX - TclOffset(String, unicode))/sizeof(Tcl_UniChar) - 1)
 #define STRING_SIZE(numChars) \
     (TclOffset(String, unicode) + (((numChars) + 1U) * sizeof(Tcl_UniChar)))
 #define stringCheckLimits(numChars) \
