In this SharePoint Online tutorial, I will show you how to add leading zeros in SharePoint calculated column.
Here, I will create a SharePoint calculated column using the TEXT function and the CONCATENATE function to add leading zeros to a number using a SharePoint calculated column.
And also, I will add zeros to the end of the SharePoint calculated column using the TEXT function along with the REPT function.
SharePoint calculated column add leading zeros
Let’s see how to add leading zeros in SharePoint Online calculated column. To achieve it, follow the steps below.
- Open a SharePoint Online list, click on the + Add column, select See all column types, and click on the Next button. Inside the Create column tab, enter the column name and choose The type of information in this column is (Calculated (calculation based on other columns)).

- Then insert the formula in the Formula box by choosing the column from the Insert column and select The data type returned from this formula, then click on OK.
The formula used for this SharePoint calculated column is listed below.
=CONCATENATE("00",TEXT(ID,"0"))

- Now, you can see the SharePoint Online calculated column is created and also shows the output of leading zeros in the SharePoint calculated column.

This is how to add leading zeros in the SharePoint Online calculated column using the TEXT and CONCATENATE functions.
Add zeros to the end of a SharePoint calculated column
Here, I will show you how to add zeros to the end of the SharePoint calculated column. To do that, follow the steps below.
- Go to the Create column tab using the same steps as the previous section, enter the column name, and choose The type of information in this column is (Calculated (calculation based on other columns)).
- Then insert the formula in the Formula box under the Additional Columns Settings by choosing the column from the Insert column. Then, select The data type returned from this formula and click OK.
The formula used to add zeros to the end of the SharePoint calculated column is given below.
=TEXT([User ID],"0")&REPT("0",2)

This is how to add zeros to the end of the SharePoint Online calculated column using the TEXT and REPT functions.
Conclusion
In this SharePoint tutorial, I have explained how to add leading zeros in SharePoint Online calculated column. Then I have shown how to add zeros to the end of the SharePoint calculated column.
You may like the following tutorials:
- SharePoint Online Calculated Column AND Condition
- SharePoint Calculated Column Concatenate Function
- SharePoint Calculated Column Convert Text to Number
- SharePoint Calculated Column Compare
- SharePoint Online Calculated Column LEN Function

Preeti Sahu is an expert in Power Apps and has more than 6 years of experience working with SharePoint and the Power Platform. As a Power Platform expert for Power BI, Power Apps, Power Automate, Power Virtual Agents, and Power Pages, she is currently employed with TSinfo Technologies. She is the author of the book Microsoft Power Platform A Deep Dive. She also made a big technical contribution to SharePointDotNet.com in the form of articles on the Power Platform. She enjoys traveling and spending time with her family in her spare time.