<TABLE> <S> <C>

<PAGE>
<ARTICLE> 5
<RESTATED> 
<CIK> 0000920231
<NAME> TRANSACTION NETWORK SERVICES
<MULTIPLIER> 1,000
       
<S>                             <C>                     <C>                     <C>
<PERIOD-TYPE>                   YEAR                   9-MOS                   YEAR
<FISCAL-YEAR-END>                          DEC-31-1995             DEC-31-1996             DEC-31-1996
<PERIOD-START>                             JAN-01-1995             JAN-01-1996             JAN-01-1996
<PERIOD-END>                               DEC-31-1995             SEP-30-1996             DEC-31-1996
<CASH>                                          15,539                  15,258                  14,735
<SECURITIES>                                    10,099                  14,775                  18,268
<RECEIVABLES>                                    8,148                  10,539                   9,948
<ALLOWANCES>                                       432                     398                     598
<INVENTORY>                                          0                       0                       0
<CURRENT-ASSETS>                                31,578                  38,152                  40,402
<PP&E>                                          18,316                  23,152                  24,160
<DEPRECIATION>                                   6,291                   9,059                  10,074
<TOTAL-ASSETS>                                  61,348                  66,717                  68,551
<CURRENT-LIABILITIES>                            5,799                   6,172                   5,551
<BONDS>                                              0                       0                       0
<PREFERRED-MANDATORY>                                0                       0                       0
<PREFERRED>                                          0                       0                       0
<COMMON>                                           121                     123                     123
<OTHER-SE>                                      54,472                  59,466                  62,068
<TOTAL-LIABILITY-AND-EQUITY>                    61,348                  66,717                  68,551
<SALES>                                         41,365                  38,941                  52,291
<TOTAL-REVENUES>                                41,365                  38,941                  52,291
<CGS>                                                0                       0                       0
<TOTAL-COSTS>                                   21,819                  21,539                  28,771
<OTHER-EXPENSES>                                12,157                  11,742                  15,736
<LOSS-PROVISION>                                     0                       0                       0
<INTEREST-EXPENSE>                                   0                       0                       0
<INCOME-PRETAX>                                  8,307                   6,907                   9,454
<INCOME-TAX>                                     3,157                   2,668                   3,640
<INCOME-CONTINUING>                              7,389                   5,660                   7,784
<DISCONTINUED>                                       0                       0                       0
<EXTRAORDINARY>                                      0                       0                       0
<CHANGES>                                            0                       0                       0
<NET-INCOME>                                     5,150                   4,239                   5,814
<EPS-PRIMARY>                                     0.46                    0.35                    0.47
<EPS-DILUTED>                                     0.45                    0.34                    0.46
        

</TABLE>