Exhibit 10.4(b)

AMENDMENT NO. 1

Dated as of August 8, 2012

to

CREDIT AGREEMENT

Dated as of April 27, 2012

THIS AMENDMENT NO. 1 (this Amendment) is made as of August 8, 2012 by and among Watsco, Inc., a Florida corporation (the Company), Watsco Canada, Inc., a New
Brunswick corporation (the Canadian Borrower and, collectively with the Company, the Borrowers), the financial institutions listed on the signature pages hereof and JPMorgan Chase Bank, N.A., as Administrative
Agent (in such capacity, the Administrative Agent), under that certain Credit Agreement dated as of April 27, 2012 by and among the Borrowers, the Canadian Subsidiary Borrowers from time to time party thereto, the Lenders,
the Administrative Agent and JPMorgan Chase Bank, N.A., as Collateral Agent (as amended, restated, supplemented or otherwise modified from time to time, the Credit Agreement). Capitalized terms used herein and not otherwise
defined herein shall have the respective meanings given to them in the Credit Agreement.

WHEREAS, the Borrowers have
requested that the requisite Lenders and the Administrative Agent agree to certain amendments to the Credit Agreement;

WHEREAS, the Borrowers, the Lenders party hereto and the Administrative Agent have so agreed on the terms and conditions set forth
herein;

NOW, THEREFORE, in consideration of the premises set forth above, the terms and conditions contained herein, and
other good and valuable consideration, the receipt and sufficiency of which are hereby acknowledged, the Borrowers, the Lenders party hereto and the Administrative Agent hereby agree to enter into this Amendment.

1. Amendments to the Credit Agreement. Effective as of the date of satisfaction of the conditions precedent set forth in
Section 2 below, the parties hereto agree that the Credit Agreement is hereby amended as follows:

(a)
Section 1.01 of the Credit Agreement is hereby amended to (x) delete the defined terms Swingline Loan and Interest Payment Date appearing therein and (ii) insert the following definitions in the
appropriate alphabetical order:

Canadian Swingline Exposure means, at any time, the
aggregate principal amount of all Canadian Swingline Loans outstanding at such time. The Canadian Swingline Exposure of any Lender at any time shall be its Applicable Percentage of the total Canadian Swingline Exposure at such time.

Canadian Swingline Loan means a Loan made to a Canadian Borrower pursuant to Section 2.05.



---

Company Swingline Exposure means, at any time, the
aggregate principal amount of all Company Swingline Loans outstanding at such time. The Company Swingline Exposure of any Lender at any time shall be its Applicable Percentage of the total Company Swingline Exposure at such time.

Company Swingline Loan means a Loan made to the Company pursuant to Section 2.05.

Interest Payment Date means (a) with respect to any ABR Loan or Canadian Base Rate Loan
(including a Swingline Loan), the last day of each March, June, September and December and the Maturity Date and (b) with respect to any Eurocurrency Loan or BA Equivalent Loan, the last day of the Interest Period applicable to the Borrowing of
which such Loan is a part and, in the case of a Eurocurrency Borrowing or a BA Equivalent Borrowing with an Interest Period of more than three months duration, each day prior to the last day of such Interest Period that occurs at intervals of
three months duration after the first day of such Interest Period and the Maturity Date.

Swingline Loans means each Company Swingline Loan and each Canadian Swingline Loan.

WCI Debt means the intercompany loan from the Company to Watsco Canada, Inc. made on or about
April 27, 2012.

(b) The definition of Applicable Rate appearing in Section 1.01 of the Credit
Agreement is hereby amended to delete the reference to Canadian Base Rate Revolving Loan appearing therein and replace such reference with a reference to Canadian Base Rate Loan.

(c) The definition of Canadian Revolving Credit Exposure appearing in Section 1.01 of the Credit Agreement is
hereby amended to add the words and Canadian Swingline Exposure immediately after the words Canadian LC Exposure appearing therein.

(d) The definition of Company Revolving Credit Exposure appearing in Section 1.01 of the Credit Agreement is hereby amended to add the word Company immediately before
the words Swingline Exposure appearing therein.

(e) The definition of Swingline Exposure appearing in
Section 1.01 of the Credit Agreement is hereby amended and restated in its entirety to read as follows:

Swingline Exposure means, collectively, the Company Swingline Exposure and the Canadian Swingline Exposure. The Swingline Exposure of any Lender at any time shall be its Applicable
Percentage of the total Swingline Exposure at such time.

(f) The second sentence of Section 2.02(b) of the Credit
Agreement is hereby amended and restated in its entirety to read as follows:

Each Company Swingline
Loan shall be an ABR Loan and each Canadian Swingline Loan shall be a Canadian Base Rate Loan.

(g) The second to last
sentence of Section 2.02(c) of the Credit Agreement is hereby amended and restated in its entirety to read as follows:



2



---

Each Company Swingline Loan shall be in an amount that is an integral
multiple of $100,000 and not less than $500,000 and each Canadian Swingline Loan shall be in an amount that is an integral multiple of Cdn.$100,000 and not less than Cdn.$500,000.

(h) Section 2.03 of the Credit Agreement is hereby amended to delete the words one (1) Business Day before
appearing in clause (b) thereof and replace such words with the word on.

(i) Section 2.05 of the
Credit Agreement is hereby amended and restated in its entirety to read as follows:

(a) Subject to the
terms and conditions set forth herein, the Swingline Lender agrees to make (i) Company Swingline Loans in Dollars to the Company and (ii) Canadian Swingline Loans in Canadian Dollars to the Canadian Borrowers, in each case from time to
time during the Availability Period, in an aggregate principal amount at any time outstanding that will not result in (u) the aggregate principal amount of outstanding Swingline Loans exceeding $65,000,000, (v) the aggregate principal
amount of outstanding Company Swingline Loans exceeding $50,000,000, (w) the aggregate principal amount of outstanding Canadian Swingline Loans exceeding $15,000,000, (x) the Dollar Amount of the total Revolving Credit Exposures exceeding
the Revolving Credit Availability at such time, (y) the Dollar Amount of the total Company Revolving Credit Exposures exceeding the Company Revolving Credit Availability at such time or (z) the Dollar Amount of the total Canadian Revolving
Credit Exposures exceeding the Canadian Revolving Credit Availability at such time; provided that the Swingline Lender shall not be required to make a Swingline Loan to refinance an outstanding Swingline Loan. Within the foregoing limits and
subject to the terms and conditions set forth herein, the Company may borrow, prepay and reborrow Company Swingline Loans and the Canadian Borrowers may borrow, prepay and reborrow Canadian Swingline Loans.

(b) To request a Swingline Loan, the applicable Borrower shall notify the Administrative Agent of such request by
telephone (confirmed by telecopy), not later than 12:00 noon, New York City time, on the day of a proposed Swingline Loan. Each such notice shall be irrevocable and shall specify the requested date (which shall be a Business Day), currency and
amount of the requested Swingline Loan and the account to which the proceeds of such Swingline Loan are to be credited. The Administrative Agent will promptly advise the Swingline Lender of any such notice received from the Company or the applicable
Canadian Borrower. The Swingline Lender shall make each Swingline Loan available to the relevant Borrower by means of a credit to the general deposit account of such Borrower (as designated by such Borrower in such notice) with the Swingline Lender
(or, in the case of a Swingline Loan made to finance the reimbursement of an LC Disbursement as provided in Section 2.06(e), by remittance to the applicable Issuing Bank) by 3:00 p.m., New York City time, on the requested date of such Swingline
Loan.

(c) The Swingline Lender may by written notice given to the Administrative Agent not later than 10:00
a.m., New York City time, on any Business Day, require the Lenders to acquire participations on such date in all or a portion of the Swingline Loans outstanding in the applicable currency of such Swingline Loans. Such notice shall specify the
aggregate amount and applicable currency of Swingline Loans in which Lenders will participate. Promptly upon receipt of such notice, the Administrative Agent will give notice thereof to each Lender, specifying in such notice such Lenders



3



---

Applicable Percentage of such Swingline Loan or Loans and the currency of such Swingline Loan or Loans. Each Lender hereby absolutely and unconditionally agrees, upon receipt of notice as
provided above, to pay in the applicable currency to the Administrative Agent, for the account of the Swingline Lender, such Lenders Applicable Percentage of such Swingline Loan or Loans. Each Lender acknowledges and agrees that its obligation
to acquire participations in Swingline Loans pursuant to this paragraph is absolute and unconditional and shall not be affected by any circumstance whatsoever, including the occurrence and continuance of a Default or reduction or termination of the
Commitments, and that each such payment shall be made without any offset, abatement, withholding or reduction whatsoever. Each Lender shall comply with its obligation under this paragraph by wire transfer of immediately available funds, in the same
manner as provided in Section 2.07 with respect to Loans made by such Lender (and Section 2.07 shall apply, mutatis mutandis, to the payment obligations of the Lenders), and the Administrative Agent shall promptly pay to the
Swingline Lender the amounts so received by it from the Lenders. The Administrative Agent shall notify the Company of any participations in any Swingline Loan acquired pursuant to this paragraph, and thereafter payments in respect of such Swingline
Loan shall be made to the Administrative Agent and not to the Swingline Lender. Any amounts received by the Swingline Lender from any Borrower (or other party on behalf of any Borrower) in respect of a Swingline Loan after receipt by the Swingline
Lender of the proceeds of a sale of participations therein shall be promptly remitted to the Administrative Agent; any such amounts received by the Administrative Agent shall be promptly remitted by the Administrative Agent to the Lenders that shall
have made their payments pursuant to this paragraph and to the Swingline Lender, as their interests may appear; provided that any such payment so remitted shall be repaid to the Swingline Lender or to the Administrative Agent, as applicable,
if and to the extent such payment is required to be refunded to the relevant Borrower for any reason. The purchase of participations in a Swingline Loan pursuant to this paragraph shall not relieve any Borrower of any default in the payment
thereof.

(j) Section 2.06(e) of the Credit Agreement is hereby amended to (x) add the word
Company immediately before the first reference to Swingline Loans appearing therein and (y) add the words or a Canadian Swingline Loan immediately after the words Canadian Base Rate Borrowing
appearing therein.

(k) Section 2.06(h) of the Credit Agreement is hereby amended to delete the word
Revolving appearing immediately after the words Canadian Base Rate appearing therein.

(l)
Section 2.07(b) of the Credit Agreement is hereby amended to insert the parenthetical (or, in the case of an ABR Borrowing or a Canadian Base Rate Borrowing, prior to the proposed time of any Borrowing) immediately after the
words prior to the proposed date of any Borrowing appearing in the first sentence thereof.

(m)
Section 2.08(a) of the Credit Agreement is hereby amended and restated in its entirety to read as follows:

(a) Subject to the provisions of this Section 2.08 and of Sections 2.13 and 2.14 hereof, (i) Company Revolving Loans (other than Company Swingline Loans) may be made or maintained only as
ABR Loans or Eurocurrency Loans, (ii) Company Swingline Loans may be made or maintained only as ABR Loans, (iii) Canadian Revolving Loans (other than Canadian Swingline Loans) may be made or maintained



4



---

only as Canadian Base Rate Loans or BA Equivalent Loans and (iv) Canadian Swingline Loans may be made or maintained only as Canadian Base Rate Loans.

(n) Section 2.10(a) of the Credit Agreement is hereby amended to delete the final sentence thereof and to replace such
sentence with the sentence The Company hereby unconditionally promises to pay to the Swingline Lender the then unpaid principal amount of each Swingline Loan on the Maturity Date.

(o) Section 2.13(a) of the Credit Agreement is hereby amended to add the word Company immediately before the
words Swingline Loan appearing therein.

(p) Section 6.02 of the Credit Agreement is hereby amended to
(i) delete the word and appearing at the end of clause (g) thereof, (ii) change clause (h) thereof to a new clause (i) thereof and (iii) add the following as a new clause (h) thereof:

(h) the pledge by the Company of the WCI Debt in favor of Watsco International, LLC, a Domestic Foreign Holdco
Subsidiary, so long as Watsco International, LLC remains a Domestic Foreign Holdco Subsidiary; and

(q)
Section 6.16 of the Credit Agreement is hereby amended to delete the references to March 31, 2012 appearing therein and to replace such references with references to June 30, 2012.

2. Conditions of Effectiveness. The effectiveness of this Amendment is subject to the conditions precedent that (i) the
Administrative Agent shall have received counterparts of this Amendment duly executed by the Borrowers, the Required Lenders, the Swingline Lender and the Administrative Agent, (ii) the Administrative Agent shall have received counterparts of
the Consent and Reaffirmation attached as Exhibit A hereto duly executed by the Subsidiary Guarantors and (iii) the Administrative Agent shall have received payment and/or reimbursement of the Administrative Agents and its
affiliates fees and expenses (including, to the extent invoiced, fees and expenses of counsel for the Administrative Agent) in connection with this Amendment.

3. Representations and Warranties of the Borrowers. Each Borrower hereby represents and warrants as follows:

(a) This Amendment and the Credit Agreement as modified hereby constitute legal, valid and binding obligations of such Borrower and are enforceable against such Borrower in accordance with their terms,
except as may be limited by applicable bankruptcy, insolvency, reorganization, moratorium or similar laws affecting the enforcement of creditors rights generally and by general principles of equity.

(b) As of the date hereof and after giving effect to the terms of this Amendment, (i) no Default or Event of Default shall have
occurred and be continuing and (ii) the representations and warranties of such Borrower set forth in the Credit Agreement, as amended hereby, are true and correct in all material respects (provided that any representation or warranty qualified
by materiality or Material Adverse Effect is true and correct in all respects).

4. Reference to and Effect on the Credit
Agreement.

(a) Upon the effectiveness hereof, each reference to the Credit Agreement in the Credit Agreement or any other
Loan Document shall mean and be a reference to the Credit Agreement as amended hereby.



5



---

(b) Each Loan Document and all other documents, instruments and agreements executed and/or
delivered in connection therewith shall remain in full force and effect and are hereby ratified and confirmed.

(c) Except
with respect to the subject matter hereof, the execution, delivery and effectiveness of this Amendment shall not operate as a waiver of any right, power or remedy of the Administrative Agent or the Lenders, nor constitute a waiver of any provision
of the Credit Agreement, the Loan Documents or any other documents, instruments and agreements executed and/or delivered in connection therewith.

5. Governing Law. This Amendment shall be construed in accordance with and governed by the law of the State of New York.

6. Headings. Section headings in this Amendment are included herein for convenience of reference only and shall not constitute a part of this Amendment for any other purpose.

7. Counterparts. This Amendment may be executed by one or more of the parties hereto on any number of separate counterparts, and
all of said counterparts taken together shall be deemed to constitute one and the same instrument. Signatures delivered by facsimile or PDF shall have the same force and effect as manual signatures delivered in person.

[Signature Pages Follow]



6



---

IN WITNESS WHEREOF, this Amendment has been duly executed as of the day and year first above
written.



WATSCO, INC., as
the CompanyBy:

/s/ Ana M. MenendezName: Ana M. MenendezTitle: Chief Financial Officer & Treasurer






WATSCO CANADA, INC.,
as the Canadian BorrowerBy:

/s/ Ana M. MenendezName: Ana M. MenendezTitle: Vice President & Treasurer








Signature Page to Amendment No. 1 to

Credit Agreement dated as of April 27, 2012

Watsco, Inc. et al



---

JPMORGAN CHASE BANK, N.A., individually as a Lender, as the Swingline Lender, as an Issuing Bank and as Administrative AgentBy:

/s/ John A. HorstName: John A. Horst
Title: Credit Executive






Signature Page to Amendment No. 1 to

Credit Agreement dated as of April 27, 2012

Watsco, Inc. et al



---

BANK OF AMERICA, N.A., as a LenderBy:

/s/ David GutierrezName: David Gutierrez Title: Senior Vice President






BANK OF AMERICA, N.A. (CANADA BRANCH), as a LenderBy:

/s/ David GutierrezName: David Gutierrez Title: Senior Vice President








Signature Page to Amendment No. 1 to

Credit Agreement dated as of April 27, 2012

Watsco, Inc. et al



---

WELLS FARGO BANK, NATIONALASSOCIATION, as a LenderBy:

/s/ Daniel N. GonzalezName: Daniel N. Gonzalez Title: Regional Vice President & Senior Vice President






Signature Page to Amendment No. 1 to

Credit Agreement dated as of April 27, 2012

Watsco, Inc. et al



---

U.S. BANK NATIONAL ASSOCIATION, as a LenderBy:

/s/ Kenneth R. FielerName: Kenneth R. Fieler Title: Vice President






Signature Page to Amendment No. 1 to

Credit Agreement dated as of April 27, 2012

Watsco, Inc. et al



---

THE NORTHERN TRUST COMPANY, as a LenderBy:

/s/ Pritha MajumderName: Pritha Majumder Title: Officer






Signature Page to Amendment No. 1 to

Credit Agreement dated as of April 27, 2012

Watsco, Inc. et al



---



BRANCH BANKING & TRUST COMPANY, as a LenderBy:

/s/ Taylor R. BeringerName: Taylor R. Beringer Title: Banking Officer




Signature Page to Amendment
No. 1 to

Credit Agreement dated as of April 27, 2012

Watsco, Inc. et al



---



BANK OF MONTREAL, CHICAGO BRANCH, as a LenderBy:

/s/ Yacouba KaneName: Yacouba Kane
Title: Vice President




BANK OF MONTREAL, TORONTO BRANCH, as a LenderBy:

/s/ Robert WrightName: Robert Wright
Title: Director






Signature Page to Amendment No. 1 to

Credit Agreement dated as of April 27, 2012

Watsco, Inc. et al



---



REGIONS BANK, as a
LenderBy:

/s/ Stephen HanagName: Stephen Hanag
Title: Senior Vice President




Signature Page to Amendment
No. 1 to

Credit Agreement dated as of April 27, 2012

Watsco, Inc. et al



---

EXHIBIT A

Consent and Reaffirmation

Each of the undersigned hereby acknowledges
receipt of a copy of the foregoing Amendment No. 1 to the Credit Agreement (as the same may be amended, restated, supplemented or otherwise modified from time to time, the Credit Agreement) by and among Watsco, Inc., a
Florida corporation (the Company), Watsco Canada, Inc., a New Brunswick corporation (the Canadian Borrower and, collectively with the Company, the Borrowers), the Canadian Subsidiary Borrowers
from time to time party thereto and JPMorgan Chase Bank, N.A., as Administrative Agent (in such capacity, the Administrative Agent) and as Collateral Agent, which Amendment No. 1 is dated as of August 8, 2012 and is by
and among the Borrowers, the financial institutions listed on the signature pages thereof and the Administrative Agent (the Amendment). Capitalized terms used in this Consent and Reaffirmation and not defined herein shall have the
meanings given to them in the Credit Agreement. Without in any way establishing a course of dealing by the Administrative Agent or any Lender, each of the undersigned consents to the Amendment and reaffirms the terms and conditions of the Subsidiary
Guaranty and any other Loan Document executed by it and acknowledges and agrees that the Subsidiary Guaranty and each and every such Loan Document executed by the undersigned in connection with the Credit Agreement remains in full force and effect
and is hereby reaffirmed, ratified and confirmed. All references to the Credit Agreement contained in the above-referenced documents shall be a reference to the Credit Agreement as so modified by the Amendment
and as the same may from time to time hereafter be amended, modified or restated.

Dated August 8, 2012

[Signature Page Follows]



---

IN WITNESS WHEREOF, this Consent and Reaffirmation has been duly executed as of the day and year above
written.



|                                            |  |                     |  |                                             |  |     |  |                    
|------------------------------------------- |  | ------------------- |  | ------------------------------------------- |  | --- |  | -------------------
|WATSCO CANADA, INC.                         |  |                     |  | WATSCO HOLDINGS, INC.                      
|                                            |  |                     |  |                                            
|By:                                         |  | /s/ Ana M. Menendez |  |                                             |  | By: |  | /s/ Ana M. Menendez
|Name: Ana M. Menendez Title: Vice President |  |                     |  | Name: Ana M. Menendez Title: Vice President





|                                            |  |                     |  |                                             |  |     |  |                    
|------------------------------------------- |  | ------------------- |  | ------------------------------------------- |  | --- |  | -------------------
|WATSCO HOLDINGS II, INC.                    |  |                     |  | WATSCO HOLDINGS III, LLC                   
|                                            |  |                     |  |                                            
|By:                                         |  | /s/ Ana M. Menendez |  |                                             |  | By: |  | /s/ Ana M. Menendez
|Name: Ana M. Menendez Title: Vice President |  |                     |  | Name: Ana M. Menendez Title: Vice President





|                                            |  |                     |  |  |  |  |  | 
|------------------------------------------- |  | ------------------- |  |  |  |  |  | 
|EAST COAST METAL DISTRIBUTORS LLC           |  |                     |  | 
|                                            |  |                     |  | 
|By:                                         |  | /s/ Ana M. Menendez |  |  |  |  |  | 
|Name: Ana M. Menendez Title: Vice President |  |                     |  | 

Signature Page to Consent and Reaffirmation to Amendment No. 1 to

Credit Agreement dated as of April 27, 2012

Watsco, Inc. et al