Space Telescope Science Institute / NASA

Until the 20th century, astronomers were stuck on a question that seems as if it should have an easy answer: Why is the night sky dark? If the infinite universe has an infinite numbers of stars, as they assumed, our evening view should be awash in their glow. Astronomers eventually got the answer to this question, known as Olbers’ paradox, when they worked out that the universe doesn’t go on forever. Our finite universe, even with its trillions and trillions of stars, doesn’t have enough stars to flood the night sky with light. On top of that, the universe is rapidly expanding—in fact, has been expanding since it first emerged—and stars were zooming away from one another and disappearing further into the darkness.

It was Edgar Allan Poe, of all people, who described our stellar surroundings best, in “Eureka,” an aptly named essay in 1848:

Were the succession of stars endless, then the background of the sky would present us a uniform luminosity, like that displayed by the galaxy—since there could be absolutely no point, in all that background, at which would not exist a star. The only mode, therefore, in which, under such a state of affairs, we could comprehend the voids which our telescopes find in innumerable directions, would be by supposing the distance of the invisible background so immense that no ray from it has yet been able to reach us at all.

The starlight that does manage to get to Earth is rather minimal. Astronomers estimate that the light is equivalent to a 60-watt lightbulb—the kind used in household light fixtures—as seen from about 2.5 miles away, in complete darkness.

This faint glow, of course, pales in comparison with what’s out there.

Astrophysicists have calculated an estimate for all the starlight ever produced throughout the history of the observable universe, which is home to at least 2 trillion galaxies, each brimming with millions and millions of stars. The universe is about 13.8 billion years old, and scientists say that their measure goes back as far as the first billion years, when the first stars were popping into existence like popcorn in hot oil.

Their findings were published Thursday in the journal Science.

The scientists estimate that the number of photons—particles of visible light—emitted by stars into the observable universe since its first billion years of existence is about 4 × 1084. Written out, the total is 4,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000, 000,000,000,000,000,000,000,000,000,000,000,000 photons.

It’s pretty much impossible to fathom this staggering number, with all its vision-blurring zeros, so the astrophysicists have offered up our own star for comparison: The sun emits about 3 × 1052 photons per year. That is 30,000,000,000,000,000,000,000,000,000,000,000, 000,000,000,000,000,000.

As you might have guessed from the parade of zeros, measuring the starlight in the entire observable universe is not a simple task. Astronomers need powerful telescopes stationed in space, where their instruments have an unobscured view, free of contamination by Earth’s atmosphere. They need telescopes such as Hubble, which, over nearly three decades of operation, has stared deep into the universe and captured photos of the earliest galaxies. But as powerful as Hubble is, the telescope can’t see them all, especially fainter galaxies. This blind spot makes it difficult to create a complete picture of the starlight in the universe.

So scientists decided to measure the starlight indirectly. For this, they turned to another NASA space observatory, the Fermi space telescope. Fermi is designed to measure gamma rays, the most energetic form of light. Like visible light, gamma rays are made of photons, but are invisible to the human eye.

Some of the best sources of gamma rays in the universe come from blazars: giant black holes, millions of times more massive than our sun, that sit in the center of their galaxy. These black holes feed on surrounding cosmic material. As they eat, the black holes burp jets of extremely energetic particles, including gamma rays, and send them shooting through space at nearly the speed of light. Despite their names, “black holes are the brightest sources in the universe, which is pretty spectacular,” says Marco Ajello, an astrophysicist at Clemson University in South Carolina and the lead author of the study.

Fermi can detect this action because hundreds of blazars are pointed directly toward Earth, making it possible to conduct precise measurements of the jets.

In their frenzy, the gamma rays can collide with a cosmic fog that has hung throughout the universe since its earliest days. The fog, known as extragalactic background light, acts as a spiderweb, catching photons. Over billions and billions of years, the fog has accumulated some radiation from all the light-producing sources—mostly stars, and some hungry black holes—in the universe. Starlight trapped in this fog continues to travel across the universe long after its sources have flamed out, producing a floating record of light.

When the gamma rays smash into the fog, it absorbs some of them. A black hole’s powerful jet, once a bright beacon in the fog, dims slightly. Fermi measures this shift, and astrophysicists can use the data to track the amount of gamma rays—of photons—that become absorbed and, in turn, track changes in the composition of the fog.

Ajello and his colleagues analyzed Fermi data for more than 700 blazars positioned at different distances from Earth. Each blazar revealed a different slice of the universe’s history; the team observed the surrounding cosmic fog at each one to estimate the starlight present in a particular epoch. “We can infer how the background light got built over time,” says Kári Helgason, an astrophysicist at the University of Iceland who is a co-author of the study.

Astrophysicists have looked back as far as current technology will allow them. But another instrument, one that could really change the game, is on its way. NASA plans to launch a telescope 100 times more powerful than Hubble in 2021. The James Webb Space Telescope will scan the universe in infrared instead of optical light, a design that will allow it to cut through cosmic fog and reveal the earliest epochs of the universe. “That’s the magic of astronomy,” Helgason says. “The further back you look [into space], you’re actually looking back in time.”

We want to hear what you think about this article. Submit a letter to the editor or write to letters@theatlantic.com.