The combined effect of Moore's law and the failure of Den nard scaling have led to multi-core mobile devices with immense computation capabilities. The biggest limitation of the computation capability for any mobile device is its battery. Mobile cloud computing is used to offload compute intensive tasks that affect a mobile device's battery. Mobile ad-hoc computing can be used as an alternative to mobile cloud computing in cases where cloud access is not available or is inhibitive to application performance, although battery drain remains a critical argument against mobile ad-hoc computing. In this paper, we present Synergy, a middleware that increases the battery life for a system of mobile devices connected in a peer-to-peer ad-hoc network. Synergy conserves energy by scaling core frequencies and by intelligently distributing the computation among peer devices. The middleware is not restricted to mobile phones and in no way restricts the mobility of the devices. Synergy considers the mobile devices connected in a peer-to-peer fashion as a single multicore device with Wifi as the interconnect. With Synergy running on Google Nexus phones we were able to conserve up to 30.6% of the system battery while incurring a latency penalty of less than 5%.