LENB

Returns the length of a string in bytes." Learn more.

Video field
Text

In Google Sheets, the LENB function is used to count the number of bytes in a given text string. The "B" in LENB stands for "bytes."

This function is specifically designed to handle double-byte characters, which are commonly used in languages such as Chinese, Japanese, and Korean.

The syntax for the LENB function is as follows:

LENB(string)

Here, "string" refers to the text or cell reference that you want to count the bytes for. The function returns the number of bytes in the given string.

Each double-byte character is counted as two bytes, while single-byte characters are counted as one byte.

It's important to note that the LENB function counts bytes, not characters.

Depending on the character encoding used, some characters may occupy more than one byte.

So, if you're working with multibyte characters, using LENB can give you a more accurate count of the data size.

Want even more from Google Sheets?


With Softr, you can turn your spreadsheets into powerful web apps.You can give advanced roles and permissions to each user, build advanced logic and automation flows, customize the design to your needs, and much more.


Softr also offers a growing library of templates for internal tools, client portals, community hubs, and more. The templates come with a Google Sheet or an Airtable base that you can use to store and manage your data easily.


Try Softr now and build your custom web apps in 10 minutes no code required!

Client Portal | Internal Tools | Web App Builder | Free Website Builder Made with Softr