How to Find Character Pixel Widths for Fonts in Excel
Question details
The user needs to determine the exact horizontal width of uppercase letters, lowercase letters, numbers, and symbols in a specific font so an Excel program can calculate the total text length in pixels.

- Product
- Excel
- Device & OS
- not provided
- Scenario
- Calculating precise text lengths in pixels for customized layout, rendering, or programming logic within an Excel workbook.
- Observed behavior
- Excel's built-in text functions, such as LEN, only count the number of characters and do not calculate pixel widths, which vary significantly based on font family, size, DPI, and rendering method.
Verify the exact font family, style, point size, and target display DPI first, as character widths are highly sensitive to these rendering environment settings.
Create a Character Width Lookup Table in Excel
Since character widths vary, manually extracting font metrics and referencing them via a lookup table is the most reliable native workaround in Excel.
Excel does not have a native function to measure the pixel width of rendered text. To achieve this, you must determine the width of each individual character using external tools and sum them up using formulas.
Use a font metrics library, a font editor, or graphic design software to measure the exact horizontal pixel width of each character in your specific font and size.
In your Excel workbook, create a new sheet. List every character (letters, numbers, symbols) in Column A, and their corresponding pixel widths in Column B.
Use a combination of the MID, VLOOKUP, and SUM functions in an array formula to break down your target text string character by character.
Configure the formula to search the reference sheet for each extracted character, retrieve its pixel width, and sum the values together to output the total text length in pixels.
Measure Rendered Text with Graphics Software
If you only need the pixel width of a few specific strings rather than building an automated program, measuring them directly in a design app is faster.
Calculate Text Length Formulas with WPS Spreadsheet
WPS Spreadsheet provides powerful array formulas and advanced text functions, making it easy to create character-width lookup tables to calculate estimated pixel lengths for your fonts.
- 1. Open WPS Spreadsheet: Launch WPS Office and open a new or existing Spreadsheet document.
- 2. Set Up Your Lookup Table: Create two columns: one for every individual character (A-Z, 0-9, symbols) and one for their known pixel widths.
- 3. Select the Target Cell: Click the cell where you want the calculated total pixel width to appear.
- 4. Enter the Array Formula: Input an array formula using SUM, VLOOKUP, and MID to reference your text cell and extract widths from the lookup table.
- 5. Calculate the Result: Press Ctrl+Shift+Enter to execute the array formula and reveal the total calculated pixel length.

Frequently Asked Questions
Can I use the Excel LEN function to get the pixel width of text?
No, the LEN function only counts the total number of characters in a string. It does not measure the physical pixel width of those characters, which changes depending on the font style and size.
Why do character widths vary within the same font family?
Character widths vary due to several factors, including whether the font is proportional (where an 'i' is narrower than a 'w'), point size, screen DPI settings, display scaling, and text-rendering methods.
How do I find out the exact Adobe font being used?
Adobe is the name of the software company and font manufacturer, not a specific font. To find the exact font, select the cell containing your text and check the Font dropdown menu in the Home tab (e.g., Adobe Garamond Pro).




