By Kimberly Chin

T-Mobile US Inc. said profit fell in the fiscal second quarter due mainly to merger- and Covid-19-related costs but sales rose as the company added more customers in the period.

T-Mobile said net profit was $110 million, or 9 cents a share, down from $939 million, or $1.09 a share, in the year-earlier period. Analysts polled by FactSet expected earnings of 12 cents a share.

Costs related to the coronavirus pandemic totaled $341 million while merger-related costs were $798 million.

Total revenue rose to $17.7 billion from $11 billion during last year's second quarter, driven by its Sprint merger and customer growth, the company said. Analysts targeted revenue around $17.64 billion.

Prepaid connections rose by 133,000 subscribers. T-Mobile also added 1.1 million postpaid phone subscribers during the quarter. Postpaid phone customers pay for service at the end of each billing cycle and are considered valuable and less likely to switch carriers.

T-Mobile had 98.3 million connections at the end of June.

Write to Kimberly Chin at kimberly.chin@wsj.com