Barnes & Noble's fiscal first-quarter loss narrowed, lifted by sales of e-books and other digital content as well as sales of the "Fifty Shades of Grey" series at its bookstores.
The largest traditional US book retailer faces tough competition from online retailers like Amazon.com and discount stores.
People are also moving away from books in favour of reading on devices such as ereaders and tablets.
These factors have pushed B&N to invest in its Nook e-reader and e-books, which benefited its quarterly results.
The chain also had the added bonus of riding the wave of popularity of the "Fifty Shades of Grey" series by EL James, the publishing phenomenon that has drawn legions of readers into bookstores.
For the period ended July 28, Barnes & Noble lost $41m, or 78 cents per share. This is smaller than the $56.6m, or 99 cents per share, that it lost a year earlier. Revenue climbed 2% to $1.45 billion from $1.42 billion.
Revenue for the retail division - which includes bookstores and its web site businesses - rose 2%. Revenue from bookstores open at least a year, a key gauge of the chain's health, increased 4.6%. This performance was buoyed by the "Fifty Shades" sales as well as the liquidation of Borders' bookstores.
Removing the sale of Nook products, revenue at bookstores open at least a year increased 7.6%. Revenue for its college bookstores open at least a year fell 2%, as the three months from May to July period is when most students are off from classes and does not include the important back-to-school buying period.
The Nook unit - which includes e-readers, digital content and accessories - reported basically flat revenue at $192m. Sales of digital content surged 46%. This content includes digital books, digital newsstand and the apps business.
Sales of devices dropped because of lower selling prices and difficulty getting enough of its e-readers with the Glowlight feature to market to meet demand. The Glowlight emits low-level light to help with bedtime reading.
Earlier this month Barnes & Noble announced that it was cutting the price for its less-expensive model Nook tablet computer by $20, undercutting Amazon's Kindle Fire. Barnes & Noble has 689 bookstores in 50 states.