Context : Thanks to recent and ongoing large scale surveys , hundreds of brown dwarfs have been discovered in the last decade . The Canada-France Brown Dwarf Survey is a wide-field survey for cool brown dwarfs conducted with the MegaCam camera on the Canada-France-Hawaii Telescope telescope . Aims : Our objectives are to find ultracool brown dwarfs and to constrain the field brown-dwarf luminosity function and the mass function from a large and homogeneous sample of L and T dwarfs . Methods : We identify candidates in CFHT/MegaCam i ^ { \prime } and z ^ { \prime } images and follow them up with pointed near infrared ( NIR ) imaging on several telescopes . Halfway through our survey we found \sim 50 T dwarfs and \sim 170 L or ultra cool M dwarfs drawn from a larger sample of 1400 candidates with typical ultracool dwarfs i ^ { \prime } - z ^ { \prime } colours , found in 780 square degrees . Results : We have currently completed the NIR follow-up on a large part of the survey for all candidates from mid-L dwarfs down to the latest T dwarfs known with utracool dwarfs ’ colours . This allows us to draw on a complete and well defined sample of 102 ultracool dwarfs to investigate the luminosity function and space density of field dwarfs . Conclusions : We found the density of late L5 to T0 dwarfs to be 2.0 ^ { +0.8 } _ { -0.7 } \times 10 ^ { -3 } objects pc ^ { -3 } , the density of T0.5 to T5.5 dwarfs to be 1.4 ^ { +0.3 } _ { -0.2 } \times 10 ^ { -3 } objects pc ^ { -3 } , and the density of T6 to T8 dwarfs to be 5.3 ^ { +3.1 } _ { -2.2 } \times 10 ^ { -3 } objects pc ^ { -3 } . We found that these results agree better with a flat substellar mass function . Three latest dwarfs at the boundary between T and Y dwarfs give the high density 8.3 ^ { +9.0 } _ { -5.1 } \times 10 ^ { -3 } objects pc ^ { -3 } . Although the uncertainties are very large this suggests that many brown dwarfs should be found in this late spectral type range , as expected from the cooling of brown dwarfs , whatever their mass , down to very low temperature .