Your post doesn't give any indication of what you are experiencing other than that it isn't as long as advertised. That could mean a small amount less than advertised or a large amount. You may want to reply with more information about what you are experiencing and how it compares to the specs below.
From http://www.apple.com/macbook/specs/
Up to 9 hours wireless web3
Up to 10 hours iTunes movie playback3
Up to 30 days of standby time3
Built-in 39.7-watt-hour lithium-polymer battery
29W USB-C Power Adapter; USB-C power port
From the footnotes of the same link:
Testing conducted by Apple in February 2015 using preproduction 1.2GHz Intel Core M-based 12-inch MacBook systems (wireless web test and HD movie playback test) as well as preproduction 1.2GHz Intel Core M-based 12-inch MacBook systems and preproduction 1.3GHz Intel Core M-based 12-inch MacBook systems (standby test), all configured with 512GB of flash storage and 8GB of RAM. The wireless web test measures battery life by wirelessly browsing 25 popular websites with display brightness set to 12 clicks from bottom or 75%. The HD movie playback test measures battery life by playing back HD 1080p content with display brightness set to 12 clicks from bottom or 75%. The standby test measures battery life by allowing a system, connected to a wireless network and signed in to an iCloud account, to enter standby mode with Safari and Mail applications launched and all system settings left at default. Battery life varies by use and configuration. See www.apple.com/batteries for more information.