Comcast and Time Warner Cable have just raised fees for renting a modem so high that it now makes sense to buy your own. Even if it's a headache installing it.

The cable companies just hiked the monthly rates they charge customers for leasing their modems -- a somewhat hidden charge that most people don't even think about.

The price hikes are significant: Time Warner Cable's fee is leaping from $5.99 to $8, and Comcast's fee is jumping from $8 to $10.

That's a surprise 25% to 33% price surge. In the case of Time Warner Cable, this is the second fee increase in just over a year. Some Comcast Xfinity customers weren't notified until mid-December that prices would be raised on Jan. 1.

Time Warner Cable noted that the fee pays for "guaranteed full support and maintenance." Comcast did not return calls for comment.

Why buying makes sense now

People typically rent a modem for three reasons: Self-installation is a confusing chore. You might buy a modem that's not compatible. And most importantly, they're expensive.

But the game has changed. Consider the yearly fees: Time Warner Cable's rental fee is now $96. Comcast's rental is now $120.

If you buy an Arris SB6121 modem, it'll pay for itself in less than a year. If you buy the faster Arris SBG6580 (modems don't have sexy or memorable names), it'll pay for itself in just over a year.

Be warned: Buying your own modem requires homework. Not all modems are compatible with Time Warner Cable and Comcast homes.

If you're a Time Warner Cable customer, you can look up whether a modem is compatible with its network on the company's website. Comcast customers can do the same on that company's website. You'll need to know a little about your current plan to figure it out.

And as Gizmodo noticed, be extra careful with Time Warner Cable. The company has a long, extensive list of dozens of approved devices that are older and therefore less expensive -- but only if you're renting. If you're buying, you can only pick from a handful of modems.

Comcast and Time Warner Cable are seeking federal approval for their proposed $45 billion merger.

Related: 17 gadget hits & flops from CES