diff --git a/core/src/main/java/com/github/kr328/clash/core/util/Traffic.kt b/core/src/main/java/com/github/kr328/clash/core/util/Traffic.kt
index 895f6f08ee69b688897a38ad81568d992155dc55..050eb506b5ce1098c3656791ca5d0112cd2e4884 100644
--- a/core/src/main/java/com/github/kr328/clash/core/util/Traffic.kt
+++ b/core/src/main/java/com/github/kr328/clash/core/util/Traffic.kt
@@ -22,17 +22,17 @@ private fun trafficString(scaled: Long): String {
         scaled > 1024 * 1024 * 1024 * 100L -> {
             val data = scaled / 1024 / 1024 / 1024
 
-            "${data / 100}.${data % 100} GiB"
+            String.format("%.2f GiB", data.toFloat() / 100)
         }
         scaled > 1024 * 1024 * 100L -> {
             val data = scaled / 1024 / 1024
 
-            "${data / 100}.${data % 100} MiB"
+            String.format("%.2f MiB", data.toFloat() / 100)
         }
         scaled > 1024 * 100L -> {
             val data = scaled / 1024
 
-            "${data / 100}.${data % 100} KiB"
+            String.format("%.2f KiB", data.toFloat() / 100)
         }
         else -> {
             "$scaled Bytes"