SAN FRANCISCO — Working out at home was supposed to be cheaper. No gym membership, no fancy workout clothes, no expensive spin classes. We were going to take free jogs in nature, do push-ups between Zoom meetings, dance off calories in our living rooms.

It turns out motivation isn’t always that easy, or free. Over the past year, our pandemic fitness routines have turned into a gold rush for tech and fitness companies like Peloton, Apple and FitBit. They’re making money off expensive home equipment, wearables, virtual consultations and increasingly, monthly subscription fees.

Fitness apps are taking a page out of Netflix’s handbook in the new year and building on their pandemic success to lure more people into workout subscriptions, which give access to prerecorded and live fitness classes or offer guidance and personalized training. Like a number of industries that have transitioned to heavily digital, many companies and even smaller studios and individual instructors are finding that subscriptions are key to survival and growth.

Data from mobile app analytics company Sensor Tower shows that consumers spent $167 million in just the top five mobile fitness apps last year alone, a 40 percent increase from the year before. And in May, 3.3 million people in the United States downloaded one of the five most popular fitness apps, a 43 percent increase from the typically busy new year’s resolution season in January.

In Kingsville, Ontario, Trish Allsop figured it was a choice between eating comfort foods and drinking wine to pass the time during the pandemic or “jump on the healthy train.” She chose the latter and bought a Peloton for $1,829 to start riding the first week of January. The subscription fee of $39 — plus the addictive nature of the classes — have kept her going.

“It’s comparable to a gym rate that we’re paying, and it motivates us to use it because we’re paying for it,” she said.

As devices and the Internet become more prolific and entire industries shift to digital, it’s increasingly clear that subscriptions are necessary to maintain previous levels of profitability. Publishers, TV streaming apps, and grocery and restaurant delivery services are all moving toward this model, which maintains a steady stream of income.

Netflix and Amazon Prime are two of the pioneers of the digital-age model. Even iPhone maker Apple has shifted its priorities to “software and services” in the past two years, essentially acknowledging that hardware sales alone are not enough to build a tech powerhouse and keep customers and their wallets engaged.

(Amazon chief executive Jeff Bezos owns The Washington Post.)

“Some of this is just business logic,” said Julie Ask, a principal analyst at Forrester Research. “Netflix and Amazon prove if you get people signed up they don’t turn it off.”

In the fitness space, people for years have been able to watch free workout videos online. The market for home tutorials became more crowded in the past decade as smartphones became ubiquitous and health wearables, especially FitBits and Apple Watches, became the fashion.

During the pandemic, as other costs were reduced and many gyms were closed, consumers have become more willing to shell out cash on workout apps, analysts say.

They can cost as little as $5 a month for a Strava bicycling app subscription, or the nearly $40 a month for Peloton’s membership, required for its on-demand classes. Monthly or annual subscriptions to services such as FitBit, WW (formerly Weight Watchers) or Peloton have steadily gained ground for years, but spending on similar home fitness apps soared in popularity last year.

Apple is the latest big name to get into the fitness market, with the launch of Apple Fitness+ last month. The $10 monthly subscription service, which offers workouts and personalized data combined with Apple Watch hardware, is the latest such service from Apple, joining Apple TV Plus and Apple Music.

Like many of these fitness offerings, the subscription is only one part of an interconnected set of products. An Apple Watch Series 3 or later is required to subscribe, starting at $199. An iPhone 6s or later is also needed — or a bigger screen.

Peloton sales, meanwhile, spiked last year, and the company said last month that more than 1.3 million people currently have both the bike and subscribe to the $39 monthly service that gives them access to guided cycling classes and other workouts. It also makes money on other things, from shoe and weight kits (starting at $150) to Peloton merchandise and apparel like custom $119 Peloton ear buds or a $20 scrunchie set.

Peloton, which went public in 2019, recently extended its usual 30-day free trial period for its app to two months, catching the January rush as resolutions kick in. Last year, it had offered a three-month trial. Strava also jumped on board last year, adding a paid subscription option with additional features to its cycling tracking app, which was previously all free.

It’s one thing to get someone to sign up for an app promising a successful fitness routine and quite another to get them to use it. Forrester’s Ask points out that paid subscriptions are harder to get people to adopt than, say, a free service. There are free workout videos a plenty on YouTube and Instagram — workout queen Jane Fonda’s original classes are even online. But Ask also said that people are more likely to stick around longer if they are paying.

In San Antonio, physician Meghana Chalasani got a Peloton bike in November, with the intention of diving right in. Instead, she had been paying for the bike and its app for nearly three months without hopping on.

Her husband asked how long they should keep it before giving up and returning it. “And I kept saying, “I don’t know,' ” she said. “He said, ‘Let’s just keep it. We’ll probably use it eventually.’ ”

Chalasani, who has a baby and another on the way, noted that her subscription is less than she would generally pay at a gym — but it’s only worth it if she starts using it.

The subscription trend holds true even for independent fitness instructors, who had to get creative when the coronavirus closed studios and gyms across the country. Roughly a decade ago, Christl Marcontell started an in-person subscription service for her Kinesia Pilates studio in Seattle during the recession to have a source of recurring revenue. The model is common with gyms, but many specialty studios rely on per-class prices.

Last year, when local regulations closed Kinesia’s doors, Marcontell and her instructors started teaching classes via Zoom. And her customers kept paying their monthly subscriptions at the same price.

“There’s no way we would be around now if they hadn’t,” she said.