Since you received the computer as a gift, any price you receive is a financial gain for you.
A computer loses its value to you when it no longer reliably does the tasks you NEED it to do, with the programs you NEED to use, and at a speed that is ACCEPTABLE to you. Even so, a family member, non-profit organization, or homeless shelter might still find lots of useful life and value in it. And if reducing your federal tax is important, you might qualify for a tax credit or tax deduction for your donation to a qualified organization.
A 2-year-old MacBook in good condition is worth more than a 4-year-old MacBook in good condition. If your goal is to get the most money, sell it now. We all WISH that computers were 'investments', like gold or diamonds. The truth is that most computers are best thought of as 'consumables', like autos, batteries, and tires.
Real-world value changes quickly. Stay current with announcements of Apple new products and new operating systems. Apple Store Refurbished 2011 MacBooks recently dropped about 10% in price when the latest models and OS X 10.8 Mountain Lion were announced on Monday, June 11th.