Skip to content

What is Short Number ​

Short Number is a lightweight, multilingual PHP library for formatting numbers into short, human-readable, compact abbreviations. It can format large numbers into short strings like 1k, 1m, 1b, 1t, 1q depending on the language and the number.

Advantages of Short Number ​

Short Number is focused on providing the best performance and the most accurate number formatting. Here are some of the advantages of using Short Number:

🚀 Performs supe- fast
Is written in a way to make the number parsing as fast as possible

🌍 Multilingual support
Supports multiple languages and can format numbers in different languages

📦 Lightweight
Has no external dependencies and is very lightweight

🪶 Low memory usage
Loads only needed data into memory when parsing the input

🛠 Easy to use
Has a simple and easy-to-use API

Largest Supported Number

The largest number that can be formatted by the Short Number library is 999 quadrillions 999,999,999,999,999,999 or 9.999 × 10¹⁷.

Supported Languages ​

LanguageCodeThousandMillionBillionTrillionQuadrillion
🇬🇧Englishen1k1m1b1t1q
🇷🇺Russianru1тыс1млн1млд1трн1квадр
🇺🇦Ukrainianuk1тис1млн1млд1трн1квадр
🇨🇳Chinesezh千100万10亿兆京
🇯🇵Japaneseja千100万10億兆京

Different Counting Systems

Large numbers in languages like Chinese, Japanese, Korean are often abbreviated using their unique counting system, based on units of 1,0000 and 1,0000,0000 instead of 10,000 and 100,000,000. This library considers this when formatting numbers and displays them in the correct format.