<TABLE> <S> <C>

<PAGE>
<ARTICLE> 9
<LEGEND>
THIS SCHEDULE CONTAINS SUMMARY FINANCIAL INFORMATION EXTRACTED FROM THE
FORM 10-KSB AND IS QUALIFIED IN ITS ENTIRETY BY REFERENCE TO SUCH FINANCIAL
STATEMENTS. THE EARNINGS PER SHARE REFLECTS A ONE (1) FOR FIVE (5) REVERSE 
SPLIT EFFECTIVE 12/31/97. PRIOR FINANCIAL DATA SCHEDULES HAVE NOT BEEN RESTATED 
TO REFLECT THE REVERSE SPLIT.
</LEGEND>
<CIK> 0000714286
<NAME> UNITED FINANCIAL BANKING COMPANIES, INC.
       
<S>                                      <C>
<PERIOD-TYPE>                              YEAR
<FISCAL-YEAR-END>                          DEC-31-1997
<PERIOD-START>                             JAN-01-1997
<PERIOD-END>                               DEC-31-1997
<CASH>                                       2,282,418
<INT-BEARING-DEPOSITS>                         100,000
<FED-FUNDS-SOLD>                             2,659,000
<TRADING-ASSETS>                                     0
<INVESTMENTS-HELD-FOR-SALE>                  1,698,506
<INVESTMENTS-CARRYING>                       1,082,773
<INVESTMENTS-MARKET>                         2,783,649
<LOANS>                                     38,084,861
<ALLOWANCE>                                  (715,399)
<TOTAL-ASSETS>                              48,074,006
<DEPOSITS>                                  43,761,761
<SHORT-TERM>                                         0
<LIABILITIES-OTHER>                            336,246
<LONG-TERM>                                          0
<PREFERRED-MANDATORY>                        1,336,000
<PREFERRED>                                          0
<COMMON>                                       561,640
<OTHER-SE>                                   2,078,359
<TOTAL-LIABILITIES-AND-EQUITY>              48,074,006
<INTEREST-LOAN>                              2,991,380
<INTEREST-INVEST>                              433,573
<INTEREST-OTHER>                                 8,914
<INTEREST-TOTAL>                             3,433,867
<INTEREST-DEPOSIT>                           1,495,204
<INTEREST-EXPENSE>                                   0
<INTEREST-INCOME-NET>                        1,938,663
<LOAN-LOSSES>                                  249,300
<SECURITIES-GAINS>                                   0
<EXPENSE-OTHER>                              1,897,780
<INCOME-PRETAX>                                 16,299
<INCOME-PRE-EXTRAORDINARY>                      16,299
<EXTRAORDINARY>                                      0
<CHANGES>                                            0
<NET-INCOME>                                    16,299
<EPS-PRIMARY>                                    (0.18)
<EPS-DILUTED>                                    (0.18)
<YIELD-ACTUAL>                                    9.07
<LOANS-NON>                                    102,023
<LOANS-PAST>                                         0
<LOANS-TROUBLED>                                     0
<LOANS-PROBLEM>                                      0
<ALLOWANCE-OPEN>                               584,106
<CHARGE-OFFS>                                  140,053
<RECOVERIES>                                    22,046
<ALLOWANCE-CLOSE>                              715,399
<ALLOWANCE-DOMESTIC>                           715,399
<ALLOWANCE-FOREIGN>                                  0
<ALLOWANCE-UNALLOCATED>                         16,799
        


</TABLE>