Data Import & Export

How to Paste a 20-Digit Number in Excel Without Losing Digits

Adam DavisAdam Davis Oct 10, 2026 878 views

Question details

The user needs to paste 20-digit numbers into Excel without the digits after the 15th position converting to zeros.

How to Paste a 20-Digit Number in Excel Without Losing Digits
Product
Excel
Device & OS
not provided
Scenario
Pasting long identifiers, such as 20-digit credit card numbers, tracking codes, or IDs, into an Excel spreadsheet.
Observed behavior
Excel preserves only the first 15 significant digits of standard numeric values, automatically replacing any subsequent digits with zeros.
Before you start

Determine whether the long numbers you are pasting require mathematical calculations. Formatting them as text prevents data loss but disables standard math functions for those specific cells.

Solution 1Recommended

Format the Target Cells as Text Before Pasting

Pre-formatting the destination cells as text forces Excel to treat the pasted number as a string, preserving all 20 digits accurately.

This is the most reliable method when pasting a large batch of long numbers. It must be done before the data is pasted, otherwise Excel will have already truncated the numbers.

1
Select the target cells

Highlight the cell, column, or range where you intend to paste the 20-digit numbers.

2
Open the Format Cells dialog

Right-click the selected area and choose 'Format Cells', or press Ctrl+1 (Command+1 on Mac).

3
Change format to Text

Navigate to the 'Number' tab, select 'Text' from the category list, and click 'OK'.

4
Paste the data

Copy your 20-digit numbers and paste them into the newly formatted text cells.

Format the Target Cells as Text Before Pasting
Calculation Limitation: Numbers formatted as text cannot be directly used in mathematical formulas like SUM or AVERAGE.
Advanced Spreadsheet Management

Preserve Long Numbers Easily with WPS Spreadsheet

WPS Office provides a lightweight, highly compatible spreadsheet tool that seamlessly handles large datasets and long numeric strings. You can easily pre-format cells to safeguard your 20-digit numbers from unwanted truncation.

  1. 1. Open your workbook: Launch WPS Spreadsheet and open or create a new workbook.
  2. 2. Select and format cells: Highlight the target cells, right-click, select 'Format Cells', and choose 'Text' under the Number tab.
  3. 3. Paste your data: Paste your 20-digit numbers into the cells. WPS will preserve all digits perfectly without converting them to zeros.
Free and lightweight Office suiteFully compatible with Microsoft Excel (.xlsx and .csv) formatsEasily format cells as Text to preserve long numeric IDs and credit card numbersFamiliar user interface for immediate productivity
microsoft office alternative - wps office

Frequently Asked Questions

Why does Excel change my 20-digit numbers to zeros after the 15th digit?

Excel follows the IEEE 754 specification for floating-point calculations, which restricts numeric precision to a maximum of 15 significant digits. Any digits typed or pasted past the 15th place are automatically truncated and converted to zeros.

Can I recover the digits if they have already turned into zeros?

No. Once the numbers are pasted into a standard numeric cell and converted to zeros, the original trailing digits are permanently lost in that workbook. You must format the cells as text first, then paste the original data again from your source.

Is there a way to do math with a 20-digit number in Excel?

Standard Excel functions cannot calculate beyond 15 digits of precision. To perform arithmetic on 20-digit numbers, you would need to use specialized Excel add-ins that handle arbitrary-precision arithmetic, or process the data using a programming language like Python or VBA.

Does this 15-digit limit apply to WPS Spreadsheet as well?

Yes. WPS Spreadsheet, like almost all major spreadsheet applications, adheres to the same universal 15-digit precision standard. You will need to use the exact same text-formatting methods in WPS to preserve 20-digit strings.