Fitbit prices IPO shares at $20: Source

Is Fitbit a good investment?
Is Fitbit a good investment?
Fitbit fears ahead of their IPO
Fitbit fears ahead of their IPO
The most impressive thing about FitBit
The most impressive thing about FitBit

FitBit, the maker of fitness-tracking gadgets, priced its initial public offering at $20 a share, according to a person familiar with the matter.

The San Francisco-based company raised the per-share price by $1 after the market closed, and is valued at $4.1 billion heading into its New York Stock Exchange debut on Thursday.

Investors are clamoring for a piece of a company that has a very unusual characteristic among tech IPOs these daysit actually makes money.

A lot of money.

Read MoreThe most impressive thing about FitBit

In the first quarter of 2015, FitBit generated net income of $48 million, a more than fivefold increase from a year earlier.

Tech investors often talk about $100 million in annual revenue as the bar to going public. FitBit is doing twice that in bottom-line profit, and in the first quarter alone posted $337 million in sales.

FitBit will trade under the ticker symbol FIT. The company raised $732 million in the offering.

Fitbit Surge watches
Source: Fitbit

It turns out that hardware isn't such a bad business.

FitBit's fitness tracking devices, which range in price from $60 to $250, produce gross margins of close to 50 percent. (Tweet This) From that pool of money, less than half of it goes to pay for operating expenses: research and development, sales and marketing, and general and administrative.

That leaves $90 million of quarterly operating income. In Silicon Valley, these numbers look crazy. This is the land where every last penny, plus tens or hundreds of millions of dollars of venture funding, get plunged into the business for growth, profitability be damned.

According to data from IPO expert Jay Ritter, a finance professor at the University of Florida, only 20 percent of tech companies to go public this year have been profitable. Last year, the number was 17 percent, down from 28 percent in 2013.

Read MoreWhy money-losing Box is finally ready for IPO

Box lost $45 million in the quarter before its recent IPO. New Relic lost $9.2 million and Shopify lost $4.5 million in the quarters before they went public. Of course, these are very different businesses, selling software subscriptions to businesses, as opposed to consumer gadgets.

GoPro, the company that most resembles FitBit because they're both device makers, generated net income of $11 million before its IPO last year. The camera maker's gross margin, or the profit left after subtracting costs of goods sold, is about 45 percent.

Can GoPro keep rallying?
Can GoPro keep rallying?

FitBit's fat margins result from creating a category and regularly delivering new products at attractive prices with an efficient manufacturing system. According to NPD, FitBit controls 76 percent of the market for wearable fitness trackers.

FitBit calculates is current market share at 85 percent. In the first quarter, the company sold 3.9 million devices, which track some combination of steps, calories burned, distance traveled, floors climbed, active minutes as well as heart rate and speed.

The company sells to 30 Fortune 500 companies, who buy them for employees as part of wellness programs.

"They have very strong brand-name recognition," said J.P. Gownder, an analyst at Forrester Research. "They are the leader in the space."

Read MoreJawbone sues Fitbit

Still, maintaining its market dominance will be almost impossible. Apple has just surged into the market with the Apple Watch, which starts at $349, and numerous large manufacturers are developing connected devices on Google's Android operating system.

The key for investors is to see continued growth as the global market for connected devices expands, without FitBit being forced to cut prices.

"In the short run, the Apple Watch is a lot more expensive," Gownder said. "But over time these single-use devices that only do fitness tracking could be absorbed into smartwatches."

—CNBC's Josh Lipton contributed reporting.