<TABLE> <S> <C>

<PAGE>
<ARTICLE> 5
<RESTATED>
<CIK>     0001046356
<NAME>      BUILDING MATERIALS HOLDING CORPORATION
<MULTIPLIER> 1,000

<S>                             <C>                     <C>                     <C>
<PERIOD-TYPE>                   6-MOS                   9-MOS                   YEAR
<FISCAL-YEAR-END>                          DEC-31-1996             DEC-31-1996             DEC-31-1996
<PERIOD-START>                             JAN-01-1996             JAN-01-1996             JAN-01-1996
<PERIOD-END>                               JUN-30-1996             SEP-30-1996             DEC-31-1996
<CASH>                                           4,630                   8,479                   7,066
<SECURITIES>                                         0                       0                       0
<RECEIVABLES>                                   87,135                  89,675                  71,415
<ALLOWANCES>                                     2,087                   2,510                   1,231
<INVENTORY>                                     74,118                  73,792                  76,415
<CURRENT-ASSETS>                               167,399                 172,400                 157,282
<PP&E>                                         119,100                 126,685                 131,523
<DEPRECIATION>                                  23,751                  25,612                  27,602
<TOTAL-ASSETS>                                 290,116                 300,791                 288,369
<CURRENT-LIABILITIES>                           70,308                  56,072                  46,815
<BONDS>                                         75,000                  95,375                  90,203
<PREFERRED-MANDATORY>                              976                     985                       0
<PREFERRED>                                          0                       0                       0
<COMMON>                                            12                      12                      12
<OTHER-SE>                                     138,790                 143,062                 145,076
<TOTAL-LIABILITY-AND-EQUITY>                   290,116                 300,791                 288,369
<SALES>                                        340,621                 547,076                 718,024
<TOTAL-REVENUES>                               340,621                 547,076                 718,024
<CGS>                                          265,287                 427,381                 559,408
<TOTAL-COSTS>                                  328,000                 524,874                 690,870
<OTHER-EXPENSES>                                     0                       0                       0
<LOSS-PROVISION>                                     0                       0                       0
<INTEREST-EXPENSE>                               5,967                   8,297                  10,496
<INCOME-PRETAX>                                  7,635                  15,175                  17,926
<INCOME-TAX>                                     3,013                   5,993                   6,935
<INCOME-CONTINUING>                              4,622                   9,182                  10,991
<DISCONTINUED>                                       0                       0                       0
<EXTRAORDINARY>                                  (342)                   (342)                   (342)
<CHANGES>                                            0                       0                       0
<NET-INCOME>                                     4,280                   8,840                  10,649
<EPS-PRIMARY>                                     0.44                    0.85                    0.99
<EPS-DILUTED>                                     0.43                    0.83                    0.97


</TABLE>