All of those external sites are more or less estimates. I think Shamsports is the best and here is their opinion:
Houston don't have as much cap space as you might expect, considering their high profile (and seemingly eternal) campaign for a superstar free agent. Nevertheless, their committed salary could drop down as low as $39,665,022 without making any trades. Francisco Garcia has a team option for $6.4 million that is not going to be exercised, and the Rockets also have a good many unguaranteed contracts, listed hereafter:
Carlos Delfino ($3,000,000, fully unguaranteed if waived on or before June 30th)
Aaron Brooks ($2,508,000, fully unguaranteed if waived on or before June 30th)
Chandler Parsons ($926,500, only $600,000 guaranteed if waived on or before June 30th)
Greg Smith ($884,293, fully unguaranteed with no guarantee date)
James Anderson ($916,099, fully unguaranteed if waived on or before October 31st)
Patrick Beverley ($788,872, fully unguaranteed with no guarantee date)
Tim Ohlbrect ($788,872, fully unguaranteed with no guarantee date)
In theory, if Houston waived all of those players except Parsons (whose salary is actually cheaper when left unwaived than the $600,000 amount would be with a roster charge added), and declined Garcia's team option, that's a cap number of $41,625,742 with four roster charges added. In practice, though, they won't all be waived. Delfino and Brooks surely will, and Ohlbrecht likely will - however, Patrick Beverley and Greg Smith are really very good NBA players tied in to ridiculously cheap contracts. Even when assuming Anderson gets waived - which itself is not a given - the renouncement of Garcia (who, strangely, is their only free agent) and the incumbent cap hold for Earl Boykins ($884,293), that leaves Houston here:
James Harden: $13,668,750 (at the moment; as a designated maximum salary contract, it is to be adjusted when new max salaries are known post-moratorium)
Omer Asik: $8,374,646
Jeremy Lin: $8,374,646
Thomas Robinson: $3,526,440
Royce White: $1,719,480
Terrence Jones: $1,551,840
Donatas Motiejunas: $1,422,720
Chandler Parsons: $926,500
Greg Smith: $884,293
Patrick Beverley: $788,872
Tyler Honeycutt: $100,000 (waived)
Roster charge: $490,180
Roster charge: $490,180
Total = $42,318,547 = $16,181,453 in cap room.
It's not enough for a maximum contract for neither Dwight nor Chris Paul. It is close enough, however, to put them in play. And there's plenty of options here. If you were the Lakers, and Dwight wanted to walk to the Rockets (which may happen), why WOULDN'T you take back Thomas Robinson and Omer Asik in a sign-and-trade? And if you were the Rockets, why WOULDN'T you do that deal when doing so would offer up an extra $12 million to throw at someone else? Or do it the other way around - fill up the cap space with straight free agent signings, then sign and trade for the other guy. There are options here, many options, and the ultimate tinker Daryl Morey will know that. Houston's not got the Detroit-level swathes of cap room the prevailing story would have you believe, but they have enough, and they have the means to make things happen. So they're big players in the market.
The reality is though that Daryl Morey is ahead of the curve in regards to cap management and he has been planning to go after Dwight for 2 years. He would not have put himself in a position to be just short of the max cap space threshold. I believe he said recently they had 20 or so ways to clear the room. The question is clearing the room while putting yourself in the best position going forward (IE getting the most for Trob)
Another point here is Morey is all about flexibility. The roster is cluttered, but there is an order to the chaos.The reason it looks so unclear is that if you are under the cap you lose some tools that above the cap teams get like TPEs, exceptions, etc. So essentially, with all the non-guaranteed deals the Rockets can go into free agency either with max cap space, by clearing everything, or slightly over the cap, preserving all the exceptions, and keeping all the non guaranteed deals. (credit to Bimathug @clutchfans for making that point)