Learn about the Energy Saver system preferences. You can set an amount of time before your Mac goes to sleep or puts the display to sleep. This will help conserve energy and prolong your battery charge. There are also other settings that can help, and even a way to schedule your Mac to sleep or wake up. You can have different settings for battery versus being plugged in.