Batteries are everywhere. They’re in our phones, our airplanes, our gasoline-powered cars, even—in the case of people with pacemakers or other implanted medical devices—our bodies.

The batteries that are really going to matter in the future, though, aren’t the ones that will help you play Angry Birds on your phone for 12 straight hours or start your vehicle on a frigid winter’s morning. The batteries with the potential to transform the world’s energy outlook will power electric vehicles and provide storage for the power grid.

“If you could wave a magic wand and solve the world’s energy problems, you’d only need to change one thing: batteries,” says Ralph Eads, vice chairman of the investment banking firm Jeffries LLC, which invests in new energy technologies.

The problem with energy is not that we don’t have enough of it; new technologies like horizontal drilling and hydraulic fracturing, or “fracking,” have recently unlocked quantities of fossil fuels unimaginable only a decade ago. The problem is that our reliance on those fossil fuels for the majority of our energy is gravely unhealthful, causing millions of premature deaths annually and altering the climate in ways both drastic and unpredictable.

But fossil fuels aren’t a popular source of energy just because they’re so abundant. They’re popular because they can store a lot of energy in a small amount of space. Batteries also store energy, but in a pound-for-pound comparison, they just can’t compete. The easiest place to demonstrate this difference is in a car:

The battery in the hybrid Toyota Prius has around 225 watt-hours of energy per pound. That’s the car battery’s energy density--the amount of energy that can be stored per unit of volume or weight. The gasoline in that Prius contains 6,000 watt-hours per pound. The energy-density difference between liquid petroleum fuels and even the most advanced batteries creates a scenario in which a 7,200-pound Chevrolet Suburban can go 650 miles on a tank of gas and an all-electric Nissan Leaf, which weighs less than half as much, has a a range of only about 100 miles.

And even though around 80 percent of Americans’ automobile trips go fewer than 40 miles, consumer research has shown that drivers suffer from “range anxiety.” They want cars that are able to go on long road trips as well as commute to work and do errands around town.

Energy density has remained the bête noire of batteries for 100 years. Whenever a new technology or design comes along that increases energy density, another crucial aspect of the battery’s performance—say, stability at high temperature, or the number of times it can be drained and recharged—suffers. And when one of those aspects is improved, energy density suffers.

Lithium-iron phosphate technology is a good example. These batteries, from Chinese maker BYD, are widely used in both electric and hybrid vehicles in southern China. They charge more quickly than the lithium-ion batteries that are common in other electric vehicles, such as the Leaf, but they’re less energy-dense.

Another highly valued aspect in battery design is how many times batteries can be charged and drained without losing their ability to store energy. Nickel-metal hydride, or NiMH, batteries, which have been the workhorse for hybrid vehicles including the Prius and Ford’s Escape hybrid for more than a decade, do well in this category. Ted J. Miller, who works on advanced battery technology for Ford Motor Company, says that Ford has pulled the batteries out of Escape hybrids in use for 260,000 miles of taxi service in San Francisco and found they still have 85 percent of their original power capability. That durability is an advantage, but for purely electric vehicles, NiMH batteries are much heavier for the same amount of energy stored by a lithium-ion battery; the extra weight lowers the vehicle’s range. NiMH batteries are also toxic—so no chucking them in the trash bin when they run out of juice—they have to be recycled. And because nickel may be more scarce in the future than lithium, these batteries could get more expensive.

Lithium-ion polymer batteries have slightly higher energy density than regular lithium-ion versions—a prototype Audi vehicle went 372 miles on a single charge—but they can’t be charged and depleted as many times, so they have lesser endurance.

It’s worth remembering that despite these limitations, batteries designed to power automobiles have come a long way in a relatively short period of time—just 40 years ago, a battery with less than half the energy density of those found in today’s hybrids and electric vehicles was considered an exotic dream—and they are bound to improve further. “We see a clear pathway to doubling battery capability,” says Ford’s Miller. “That's without changing the technology dramatically, but improving the process so we have high-quality automotive batteries with the same energy content as we find on portable devices today.”

Such a battery for all-electric vehicles would transform transportation, making it much more climate-friendly. Transportation accounts for about 27 percent of U.S. greenhouse gas emissions, and about 14 percent of worldwide emissions. Ninety-five percent of U.S. passenger vehicles run on petroleum. If those cars and trucks could be replaced with electric vehicles, if would significantly reduce pollution even if the electricity continues to come mainly from coal, the Department of Energy has found. That’s because internal combustion engines are so inefficient, losing as much as 80 percent of the energy in their fuel to heat, while electric motors put almost all their energy into propelling the vehicle.

Batteries can play a role in changing the source of our electricity, as well, by storing energy produced from renewable sources like wind and solar. As utilities have increased the percentage of electricity they produce from these sources, the guiding principle has been that natural gas-fired power plants would be necessary to meet demand when wind turbines and photovoltaic cells aren’t producing. If excess renewable energy produced when demand is low could be transferred to a battery, stored without significant loss and drained out quickly when demand rises—and if the system were cheap enough—it would obviate the need for both the coal-fired plants renewables would replace, and the natural-gas plants considered essential to accompany wind and solar.

“Large-volume batteries that can time-shift energy would be the game changer,” says Peter Rothstein, president of the New England Clean Energy Council.

Batteries that store energy for the grid have different requirements than those that go into cars, because vehicles require relatively compact batteries that can transfer their energy almost instantaneously. So technologies that don’t work well for powering electric vehicles can be great at storing power for the grid.

Lithium-air batteries, a relatively new technology that has generated a lot of excitement, can have greater energy density than existing lithium batteries, but they provide much less of the power that would be needed to accelerate a vehicle, says Ford’s Miller. “If you need 120 kilowatts of power capability, with lithium-air you might need 80-to-100 kilowatt-hours of battery energy to meet that requirement,” Miller explains. “That’s a very cumbersome, very large battery.” It wouldn’t work well in a car--the Ford Focus EV, by comparison, uses a little over 100 kilowatts of power with a 23 kilowatt-hour battery--but it might when sitting next to a wind farm.

Vanadium flow batteries, another promising development, also have high energy density, and they have a fast discharge time, which make them ideal for storage. That’s the application for which Ron MacDonald, CEO of American Vanadium, is pitching them. “There are lots of good storage options, but every one has an issue,” MacDonald acknowledges. “Our issue has always been upfront cost, because we're more expensive.” A vanadium-flow battery can last 20 years, though, “so we’re below most others if you look at cost over the life of the battery,” he says.

But the development of the so-called “smart” grid--which will use advanced algorithms and communications technology to respond quickly as power supply and consumer demand ebb and flow--and distributed storage has perhaps made more energy-dense batteries less necessary than experts have thought in the past. With tens of thousands of small batteries in cars, traffic lights and elsewhere throughout a city, an electric utility could theoretically draw down power from these batteries during times of high demand, and return the energy to customers several hours later.

Utilities may also attempt to change when and how people use energy by charging exorbitant rates for electricity purchases over a certain level during periods of high demand. Customers will be discouraged from placing high loads on the system, such as by operating large appliances or charging their electric car, during those times. Like batteries, such practices would flatten the curve of electricity production needs imposed on the utility.

“Demand response will play as important a role as storage will,” says Randy Howard, director of power system planning and development for the Los Angeles Department of Water & Power.

Nonetheless, Howard would like to see a battery bring to utilities the type of advance that oil and gas producers have seen. “We're all hopeful that at some point there will be a technological leap in batteries, but that hasn't happened yet,” Howard says. “We’re looking for our fracking in the battery world.”