size of OSX Yosemite, don't understand who only 40 GB let on HD
DiskInventoryX will allow you to view a diagram of every file of your Mac and parts will be larger relative to file size. You can find it here: http://www.derlien.com/ This should allow you to find what's taking up so much space on your Mac.