opportunities while capitalizing on the growth potential of our existing asset base, especially given the tailwinds across several of our core product categories, including cybersecurity, cloud and data center technologies.”
Dividend
Subsequent to the quarter end, on August 3, 2021, Wayside’s board of directors declared a quarterly dividend of $0.17 per share of its common stock payable on August 20, 2021 to shareholders of record on August 16, 2021.
Second Quarter 2021 Financial Results
Net sales in the second quarter of 2021 increased 33% to $75.4 million compared to $56.6 million for the same period in 2020. This reflects both strong organic growth and the benefit from the acquisition of CDF, as well as one month of incremental contribution from Interwork, which was acquired in May 2020.
Adjusted gross billings (a non-GAAP financial measure defined below) in the second quarter of 2021 increased 48% to $235.1 million compared to $158.7 million for the same period in 2020.
Gross profit in the second quarter of 2021 increased 54% to a record $11.0 million compared to $7.1 million for the same period in 2020. The increase in gross profit was driven by organic growth and the benefit of the CDF and Interwork acquisitions.
Total selling, general, and administrative (“SG&A”) expenses in the second quarter of 2021 were $8.5 million compared to $6.4 million for the same period in 2020. The increase was primarily driven by incremental costs related to the operations of CDF and Interwork. Further, these expenses reflect increased investments ahead of the Company’s growth objectives, which are expected to drive continued increases in gross profit during the coming quarters. As a percentage of net sales, SG&A was 11.3% compared to 11.2% for the same period in 2020.
Net income in the second quarter of 2021 increased approximately 4x to $2.1 million or $0.49 per diluted share, compared to $0.6 million or $0.13 per diluted share for the same period in 2020.
Adjusted EBITDA (a non-GAAP financial measure defined below) in the second quarter of 2021 increased 68% to $3.5 million compared to $2.1 million for the same period in 2020. The increase was driven by the aforementioned organic growth and benefit from CDF and Interwork, as well as operating leverage.
Effective margin, which is defined as adjusted EBITDA as a percentage of gross profit, was 32.0% in the second quarter of 2021 compared to 29.3% for the same period in 2020.
Cash and cash equivalents were $23.8 million on June 30, 2021, compared to $29.3 million at December 31, 2020. The decrease was attributed to timing of cash flows which are expected and not an indication of any other business or operating trend. The Company remained debt