Biggest changeYear Ended December 31, 2022 2021 2020 Consolidated Statements of Operations Data: (In thousands, except share and per share amounts) Revenue $ 3,826,321 $ 2,841,839 $ 1,761,776 Cost of revenue (1) (2) 2,012,744 1,451,126 846,115 Gross profit 1,813,577 1,390,713 915,661 Operating expenses: Research and development (1) (2) 1,079,081 789,219 530,548 Sales and marketing (1) (2) 1,248,032 1,044,618 567,407 General and administrative (1) (2) 517,414 472,460 310,607 Restructuring costs (1) 76,636 — — Impairment of long-lived assets 97,722 — — Total operating expenses 3,018,885 2,306,297 1,408,562 Loss from operations (1,205,308) (915,584) (492,901) Other expenses, net: Share of losses from equity method investment (35,315) — — Other expenses, net (3,009) (45,345) (11,525) Total other expenses, net (38,324) (45,345) (11,525) Loss before (provision for) benefit from income taxes (1,243,632) (960,929) (504,426) (Provision for) benefit from income taxes (12,513) 11,029 13,447 Net loss attributable to common stockholders $ (1,256,145) $ (949,900) $ (490,979) Net loss per share attributable to common stockholders, basic and diluted $ (6.86) $ (5.45) $ (3.35) Weighted-average shares used in computing net loss per share attributable to common stockholders, basic and diluted 182,994,038 174,180,465 146,708,663 __________________________________ (1) Includes stock-based compensation expense as follows: Year Ended December 31, 2022 2021 2020 (In thousands) Cost of revenue $ 21,136 $ 14,074 $ 8,857 Research and development 374,846 258,672 173,303 Sales and marketing 240,109 213,351 103,450 General and administrative 148,194 146,188 76,301 Restructuring costs 14,275 — — Total $ 798,560 $ 632,285 $ 361,911 ____________________________________ (2) Includes amortization of acquired intangibles as follows: Year Ended December 31, 2022 2021 2020 (In thousands) Cost of revenue $ 122,653 $ 114,896 $ 59,501 Research and development 1,680 1,260 — Sales and marketing 81,841 82,493 38,915 General and administrative 7 135 78 Total $ 206,181 $ 198,784 $ 98,494 55 Table of Contents The following table sets forth our results of operations for each of the periods presented as a percentage of our total revenue: Year Ended December 31, 2022 2021 2020 Consolidated Statements of Operations, as a percentage of revenue: ** Revenue 100 % 100 % 100 % Cost of revenue 53 51 48 Gross profit 47 49 52 Operating expenses: Research and development 28 28 30 Sales and marketing 33 37 32 General and administrative 14 17 18 Restructuring costs 2 — — Impairment of long-lived assets 3 — — Total operating expenses 79 81 80 Loss from operations (32) (32) (28) Other expenses, net Share of losses from equity method investment (1) — — Other expenses, net * (2) (1) Total other expenses, net (1) (2) (1) Loss before (provision for) benefit from income taxes (33) (34) (29) (Provision for) benefit from income taxes * * 1 Net loss attributable to common stockholders (33 %) (33 %) (28 %) ____________________________________ * Less than 0.5% of revenue. ** Columns may not add up to 100% due to rounding. 56 Table of Contents Comparison of Fiscal Years Ended December 31, 2022, 2021 and 2020 Revenue Year Ended December 31, 2022 2021 2020 2021 to 2022 Change 2020 to 2021 Change (Dollars in thousands) Total Revenue $ 3,826,321 $ 2,841,839 $ 1,761,776 $ 984,482 35 % $ 1,080,063 61 % 2022 compared to 2021 In 2022, total revenue increased by $984.5 million, or 35%, compared to the same period last year.
Biggest changeYear Ended December 31, 2023 2022 2021 Consolidated Statements of Operations Data: (In thousands, except share and per share amounts) Revenue $ 4,153,945 $ 3,826,321 $ 2,841,839 Cost of revenue (1) (2) 2,110,015 2,012,744 1,451,126 Gross profit 2,043,930 1,813,577 1,390,713 Operating expenses: Research and development (1) (2) 942,790 1,079,081 789,219 Sales and marketing (1) (2) 1,022,985 1,248,032 1,044,618 General and administrative (1) (2) 468,459 517,414 472,460 Restructuring costs (1) 165,733 76,636 — Impairment of long-lived assets 320,504 97,722 — Total operating expenses 2,920,471 3,018,885 2,306,297 Loss from operations (876,541) (1,205,308) (915,584) Other expenses, net: Share of losses from equity method investment (121,897) (35,315) — Impairment of strategic investments (46,154) — — Other income (expenses), net 47,863 (3,009) (45,345) Total other expenses, net (120,188) (38,324) (45,345) Loss before (provision for) benefit from income taxes (996,729) (1,243,632) (960,929) (Provision for) benefit from income taxes (18,712) (12,513) 11,029 Net loss attributable to common stockholders $ (1,015,441) $ (1,256,145) $ (949,900) Net loss per share attributable to common stockholders, basic and diluted $ (5.54) $ (6.86) $ (5.45) Weighted-average shares used in computing net loss per share attributable to common stockholders, basic and diluted 183,327,844 182,994,038 174,180,465 __________________________________ (1) Includes stock-based compensation expense as follows: Year Ended December 31, 2023 2022 2021 (In thousands) Cost of revenue $ 26,343 $ 21,136 $ 14,074 Research and development 331,526 374,846 258,672 Sales and marketing 183,389 240,109 213,351 General and administrative 121,584 148,194 146,188 Restructuring costs 13,015 14,275 — Total $ 675,857 $ 798,560 $ 632,285 ____________________________________ (2) Includes amortization of acquired intangibles as follows: Year Ended December 31, 2023 2022 2021 (In thousands) Cost of revenue $ 113,266 $ 122,653 $ 114,896 Research and development 1,913 1,680 1,260 Sales and marketing 77,128 81,841 82,493 General and administrative — 7 135 Total $ 192,307 $ 206,181 $ 198,784 59 Table of Contents The following table sets forth our results of operations for each of the periods presented as a percentage of our total revenue: Year Ended December 31, 2023 2022 2021 Consolidated Statements of Operations, as a percentage of revenue: ** Revenue 100 % 100 % 100 % Cost of revenue 51 53 51 Gross profit 49 47 49 Operating expenses: Research and development 23 28 28 Sales and marketing 25 33 37 General and administrative 11 14 17 Restructuring costs 4 2 — Impairment of long-lived assets 8 3 — Total operating expenses 70 79 81 Loss from operations (21) (32) (32) Other expenses, net Share of losses from equity method investment (3) (1) — Impairment of strategic investments (1) — — Other income (expenses), net 1 * (2) Total other expenses, net (3) (1) (2) Loss before (provision for) benefit from income taxes (24) (33) (34) (Provision for) benefit from income taxes * * * Net loss attributable to common stockholders (24 %) (33 %) (33 %) ____________________________________ * Less than 0.5% of revenue. ** Columns may not add up to 100% due to rounding. 60 Table of Contents Comparison of Fiscal Years Ended December 31, 2023, 2022 and 2021 Revenue Year Ended December 31, 2023 2022 2021 2022 to 2023 Change 2021 to 2022 Change (Dollars in thousands) Twilio Communications $ 3,858,693 $ 3,550,087 $ 2,640,874 $ 308,606 9 % $ 909,213 34 % Twilio Segment 295,252 276,234 200,965 19,018 7 % 75,269 37 % Consolidated total revenue $ 4,153,945 $ 3,826,321 $ 2,841,839 $ 327,624 9 % $ 984,482 35 % 2023 compared to 2022 In 2023, Communications revenue increased by $308.6 million, or 9%, compared to the same period last year.
Our ability to drive growth and generate incremental revenue depends, in part, on our ability to maintain and grow our relationships with existing Active Customer Accounts and to increase their use of our platform. An important way in which we have historically tracked performance in this area is by measuring the Dollar-Based Net Expansion Rate for Active Customer Accounts.
Our ability to drive growth and generate incremental revenue depends, in part, on our ability to maintain and grow our relationships with existing Active Customer Accounts and to increase their use of the platform. An important way in which we have historically tracked performance in this area is by measuring the Dollar-Based Net Expansion Rate for Active Customer Accounts.
Cost of revenue also includes cloud infrastructure fees, direct costs of personnel, such as salaries and stock‑based compensation for our customer support employees, and other non‑personnel costs, such as depreciation and amortization expense related to data centers and hosting equipment, amortization of capitalized internal-use software development costs and acquired intangible assets.
Cost of revenue also includes cloud infrastructure fees, direct costs of personnel, such as salaries and stock‑based compensation for our customer support employees, and other non‑personnel costs, such as depreciation and amortization expense related to data centers and hosting equipment, and amortization of capitalized internal-use software development costs and acquired intangible assets.
(Provision for) Benefits From Income Taxes Our (provision for) benefit from income taxes consists primarily of income taxes, withholding taxes in foreign jurisdictions in which the Company conducts business and tax benefits related to the release of valuation allowance from historically completed acquisitions.
(Provision for) Benefit From Income Taxes Our (provision for) benefit from income taxes consists primarily of income taxes, withholding taxes in foreign jurisdictions in which the Company conducts business and tax benefits related to the release of valuation allowance from historically completed acquisitions.
This increase was primarily attributable to an increase in the usage of our products by our existing customers as reflected in our Dollar-Based Net Expansion Rate of 121%, as well as a 13% increase in the number of Active Customer Accounts, from over 256,000 as of December 31, 2021, to over 290,000 as of December 31, 2022.
This increase was primarily attributable to a 13% increase in the number of Active Customer Accounts, from over 256,000 as of December 31, 2021, to over 290,000 as of December 31, 2022, as well as an increase in the usage of our products by our existing customers, as reflected in our Dollar-Based Net Expansion Rate of 121%.
The increase in personnel costs were largely a result of a 21% average increase in general and administrative headcount to support the growth of our business globally. The increase was also attributable to a $28.3 million increase in our bad debt expense.
The increase in personnel costs were largely a result of a 21% increase in average general and administrative headcount to support the growth of our business globally. The increase was also attributable to a $28.3 million increase in our bad debt expense.
Other long-term assets increased $146.5 million primarily due to an increase in the sales commissions balances related to the growth of our business. The impairment of operating lease assets and other long lived assets is described further in Note 5 to our consolidated financial statements included elsewhere in this Annual Report on Form 10-K.
Other long-term assets increased $146.5 million primarily due to an increase in the sales commissions balances related to the growth of our business. The impairment of operating lease and other long lived assets is described further in Note 6 to our consolidated financial statements included elsewhere in this Annual Report on Form 10-K.
Accounts payable and other current liabilities increased $105.8 million primarily due to increases in transaction volumes, the impact from the new sabbatical employee benefit that we introduced effective July 1, 2022. Operating lease liabilities decreased $54.5 million due to payments made against our operating lease obligations.
Accounts payable and other current liabilities increased $105.8 million primarily due to increases in transaction volumes, and the impact from the then new sabbatical employee benefit that we introduced effective July 1, 2022. Operating lease liabilities decreased $54.5 million due to payments made against our operating lease obligations.
The increase was primarily attributable to a $264.4 million increase in personnel costs, net of capitalized costs, largely as a result of a 33% average increase in our research and development headcount as we continued to focus on enhancing our Twilio Segment and Flex products and strengthening our platform infrastructure.
The increase was primarily attributable to a $264.4 million increase in personnel costs, net of capitalized costs, largely as a result of a 33% increase in average research and development headcount as we continued to focus on enhancing our Segment and Flex products and strengthening our platform infrastructure.
We may also incur higher than usual losses related to deterioration of quality of certain financial assets caused by the macroeconomic conditions. Restructuring Costs.
We may also incur higher than usual losses related to deterioration of quality of certain financial assets caused by macroeconomic conditions. Restructuring Costs.
In 2022, sales and marketing expenses increased by $203.4 million, or 19%, compared to the same period last year. The increase was primarily attributable to a $175.5 million increase in personnel costs, largely as a result of a 26% average increase in sales and marketing headcount as we continued to expand our sales efforts globally.
In 2022, sales and marketing expenses increased by $203.4 million, or 19%, compared to the same period in the prior year. The increase was primarily attributable to a $175.5 million increase in personnel costs, largely as a result of a 26% increase in average sales and marketing headcount as we continued to expand our sales efforts globally.
Cash Flows from Investing Activities In 2022, cash used in investing activities was $616.5 million primarily consisting of $498.9 million of purchases of marketable securities and other investments, net of maturities and sales, $45.8 million related to capitalized software development costs, $37.4 million of net cash paid to acquire other businesses and $34.4 million related to purchases of long-lived assets.
In 2022, cash used in investing activities was $616.5 million primarily consisting of $498.9 million of purchases of marketable securities and other investments, net of maturities and sales, $45.8 million related to capitalized software development costs, $37.4 million of net cash paid to acquire other businesses and $34.4 million related to purchases of long-lived assets.
The primary difference between our effective tax rate and the federal statutory rate relates to the full valuation allowance the Company established on the federal, state and certain foreign net operating losses and credits. 50 Table of Contents Non-GAAP Financial Measures We use the following non‑GAAP financial information, collectively, to evaluate our ongoing operations and for internal planning and forecasting purposes.
The primary difference between our effective tax rate and the federal statutory rate relates to the valuation allowance the Company established on the federal, state and certain foreign net operating losses and credits. 56 Table of Contents Non-GAAP Financial Measures We use the following non‑GAAP financial information, collectively, to evaluate our ongoing operations and for internal planning and forecasting purposes.
We define U.S. revenue as revenue from customers with IP addresses or mailing addresses at the time of registration in the United States. We define international revenue as revenue from customers with IP addresses or mailing addresses at the time of registration outside of the United States. Cost of Revenue and Gross Margin Cost of Revenue .
We define U.S. revenue as revenue from customers with IP addresses or mailing addresses at the time of registration in the United States. We define international revenue as revenue from customers with IP addresses or mailing addresses at the time of registration outside of the United States. Cost of Revenue and Gross Profit Cost of Revenue .
Our primary uses of cash include operating costs, such as personnel-related costs, network service provider costs, cloud infrastructure costs, facility-related spending, as well as, from time to time, acquisitions and investments.
Our primary uses of cash include operating costs, such as personnel-related costs, network service provider costs, cloud infrastructure costs, facility-related spending, as well as, from time to time, acquisitions, investments and share repurchases.
These Notes are described in detail in Note 13 to our consolidated financial statements included elsewhere in this Annual Report on Form 10-K.
These Notes are described in detail in Note 14 to our consolidated financial statements included elsewhere in this Annual Report on Form 10-K.
In the years ended December 31, 2022, 2021, and 2020, our revenue was $3.8 billion, $2.8 billion and $1.8 billion, respectively, and our net loss was $1.3 billion, $949.9 million and $491.0 million, respectively.
In the years ended December 31, 2023, 2022, and 2021, our revenue was $4.2 billion, $3.8 billion and $2.8 billion, respectively, and our net loss was $1.0 billion, $1.3 billion and $949.9 million, respectively.
In the three years ended December 31, 2022, 2021 and 2020, revenue from Active Customer Accounts represented over 99% of total revenue in each period. Dollar‑Based Net Expansion Rate Our Dollar-Based Net Expansion Rate compares the total revenue from all Active Customer Accounts in a quarter to the same quarter in the prior year.
In the three years ended December 31, 2023, 2022 and 2021, revenue from Active Customer Accounts represented over 99% of total revenue in each period. 53 Table of Contents Dollar‑Based Net Expansion Rate Our Dollar-Based Net Expansion Rate compares the total revenue from all Active Customer Accounts and customer accounts from Zipwhip in a quarter to the same quarter in the prior year.
Sales and marketing expenses also include expenditures related to advertising, marketing, our brand awareness activities, costs related to our SIGNAL customer and developer conferences, credit card processing fees, professional services fees, depreciation, amortization of acquired intangible assets and an allocation of our general overhead expenses.
Sales and marketing expenses also include expenditures related to advertising, marketing, brand awareness activities, costs related to our SIGNAL customer and developer conferences, credit card processing fees, professional services fees, depreciation, amortization of acquired intangible assets and an allocation of our general overhead expenses. Sales and marketing expenses are generally directly attributable to each segment.
To calculate the Dollar-Based Net Expansion Rate, we first identify the cohort of Active Customer Accounts that were Active Customer Accounts in the same quarter of the prior year.
To calculate the Dollar-Based Net Expansion Rate, we first identify the cohort of Active Customer Accounts and customer accounts from Zipwhip that were Active Customer Accounts or customer accounts from Zipwhip in the same quarter of the prior year.
Operating Expenses The most significant components of operating expenses are personnel costs, which consist of salaries, benefits, sales commissions and bonuses and stock‑based compensation. We also incur other non‑personnel costs related to our general overhead expenses. Research and Development.
Gross profit represents revenue less cost of revenue. Operating Expenses The most significant components of operating expenses are personnel costs, which consist of salaries, benefits, sales commissions and bonuses and stock‑based compensation. We also incur other non‑personnel costs related to our general overhead expenses. Research and Development.
Our gross margin has been and will continue to be affected by a number of factors, including the timing and extent of our investments in our operations; our product mix; our ability to manage our network service provider and cloud infrastructure‑related fees, including A2P SMS fees; the mix of U.S. revenue compared to international revenue; changes in foreign exchange rates; the timing of amortization of capitalized software development costs and acquired intangibles; and the extent to which we periodically choose to adjust prices of our products.
Our gross margin is impacted by a number of factors, including the timing and extent of our investments in our operations; our product mix; our ability to manage our cloud infrastructure‑related and network service provider fees, including 52 Table of Contents A2P SMS fees; the mix of U.S. revenue compared to international revenue; changes in foreign exchange rates; the timing of amortization of capitalized software development costs and acquired intangibles; and the extent to which we periodically choose to adjust prices of our products.
The increase was also due to a $13.4 million increase in advertising expenses. 58 Table of Contents In 2022, general and administrative expenses increased by $45.0 million, or 10%, compared to the same period last year.
The increase was also due to a $13.4 million increase in advertising expenses. In 2022, general and administrative expenses increased by $45.0 million, or 10%, compared to the same period in the prior year.
Our arrangements with network service providers require us to pay fees based on the volume of phone calls initiated or text messages sent, as well as the number of telephone numbers acquired by us to service our customers.
Our arrangements with network service providers require us to pay fees based on the volume of phone calls initiated or text messages sent, as well as the number of telephone numbers acquired by us to service our customers. Our arrangements with our cloud infrastructure providers require us to pay fees based on our server capacity consumption. Gross Profit .
Impairment of Long-Lived Assets. Impairment of long-lived assets consists primarily of impairment charges allocated to the carrying amount of certain operating right-of-use assets and the associated leasehold improvements and property and equipment when the carrying amounts exceed their respective fair values.
Impairment of Long-Lived Assets. Impairment of long-lived assets consists of impairment of intangible assets and certain operating right-of-use assets and the associated leasehold improvements and property and equipment when the carrying amounts exceed their respective fair values.
We believe that the accounting policies, assumptions and estimates associated with revenue recognition and business combinations have the greatest potential impact on our consolidated financial statements. Therefore, we consider these to be our critical accounting policies and estimates.
Our actual results could differ from these estimates. We believe that the accounting policies, assumptions and estimates associated with revenue recognition have the greatest potential impact on our consolidated financial statements. Therefore, we consider these to be our critical accounting policies and estimates.
We believe that use of our platform by customers at or above the $5 per month threshold is a stronger indicator of potential future engagement than trial usage of our platform or usage at levels below $5 per month. The number of Active Customer Accounts is rounded down to the nearest thousand .
We believe that use of our platform by customers at or above the $5 per month threshold is a stronger indicator of potential future engagement than trial usage of our platform or usage at levels below $5 per month.
In 2022, U.S. revenue and international revenue represented $2.5 billion, or 66%, and $1.3 billion, or 34%, respectively, of total revenue. In 2021, U.S. revenue and international revenue represented $1.9 billion, or 68%, and $914.5 million, or 32%, respectively, of total revenue.
In 2022, U.S. revenue and international revenue represented $2.5 billion, or 66%, and $1.3 billion, or 34%, of total revenue, respectively.
This increase was primarily attributable to increases in the usage of our products by our existing customers, as reflected in our Dollar‑Based Net Expansion Rate of 131%, as well as a 16% increase in the number of Active Customer Accounts, from 221,000 as of December 31, 2020, to over 256,000 as of December 31, 2021.
This increase was primarily attributable to a 13% increase in the number of Communications Active Customer Accounts from over 249,000 as of December 31, 2021, to over 282,000 as of December 31, 2022, as well as the increased usage of our products by our existing customers, as reflected in our Communications Dollar‑Based Net Expansion Rate of 121%.
Our actual results may differ materially from those anticipated in these forward-looking statements as a result of various factors, including those set forth under Part II, Item 1A, “Risk Factors” in this Annual Report on Form 10-K. Overview We enable businesses to reinvent how they engage with their customers.
Our actual results may differ materially from those anticipated in these forward-looking statements as a result of various factors, including those set forth under Part I, Item 1A, “Risk Factors” in this Annual Report on Form 10-K.
The following table summarizes our revenue growth, our number of Active Customer Accounts and Dollar-Based Net Expansion Rate for 2022, 2021 and 2020.
The following table summarizes our year-over-year revenue growth and Dollar-Based Net Expansion Rate for the years ended December 31, 2023, 2022 and 2021, and the number of Active Customer Accounts as of December 31, 2023, 2022 and 2021.
Cash Flows from Financing Activities In 2022, cash provided by financing activities was $45.0 million primarily consisting of $59.6 million in proceeds from stock options exercised by our employees and shares issued under our 2016 Employee Stock Purchase Plan (the “ESPP”), offset by $13.4 million in principal payments on debt and finance leases.
In 2022, cash provided by financing activities was $45.0 million primarily consisting of $59.6 million in proceeds from stock options exercised by our employees and shares issued under our employee stock purchase plan, offset by $13.4 million in principal payments on debt and finance leases. Critical Accounting Policies and Estimates Our consolidated financial statements are prepared in accordance with U.S.
We are focusing our research and development investment in the highest impact product areas for our future. We are investing strategically in alignment with our focus on building a trusted leading customer engagement platform. Sales and Marketing. Sales and marketing expenses consist primarily of personnel costs, including commissions and bonuses to our sales employees.
We are investing strategically in alignment with our focus on building a trusted, leading customer engagement platform. 55 Table of Contents Sales and Marketing. Sales and marketing expenses consist primarily of personnel costs, including commissions and bonuses to our sales employees.
With respect to changes in operating assets and liabilities, accounts receivable and prepaid expenses increased $196.0 million primarily due to revenue growth, the timing of cash receipts and pre-payments for cloud infrastructure fees and certain operating expenses. Accounts payable and other current liabilities increased $137.7 million primarily due to increases in transaction volumes.
With respect to changes in operating assets and liabilities, accounts receivable and prepaid expenses increased $141.4 million primarily due to revenue growth, timing of cash receipts and pre-payments of our cloud infrastructure fees and certain operating expenses.
For further detail refer to Note 5 to our consolidated financial statements included elsewhere in this Annual Report on Form 10-K. 2021 compared to 2020 In 2021, research and development expenses increased by $258.7 million, or 49%, compared to the same period in the prior year.
For further detail refer to Notes 3 and 11 to our consolidated financial statements included elsewhere in this Annual Report on Form 10-K. 2022 compared to 2021 In 2022, other expenses, net, decreased by $7.0 million, or 15%, compared to the same period in the prior year.
Cash Flows The following table summarizes our cash flows: Year Ended December 31, 2022 2021 2020 (In thousands) Cash (used in) provided by operating activities $ (254,368) $ (58,192) $ 32,654 Cash used in investing activities (616,452) (2,489,996) (845,855) Cash provided by financing activities 45,007 3,096,325 1,493,311 Effect of exchange rate changes on cash, cash equivalents and restricted cash 60 (191) 40 Net (decrease) increase in cash, cash equivalents and restricted cash $ (825,753) $ 547,946 $ 680,150 60 Table of Contents Cash Flows from Operating Activities In 2022, cash used in operating activities consisted primarily of our net loss of $1.3 billion adjusted for non-cash items, including $798.6 million of stock-based compensation expense reflecting the impact of the September Plan, $279.1 million of depreciation and amortization expense, $97.7 million of impairment of operating lease assets and other long-lived assets, $57.9 million amortization of deferred commissions, $47.2 million of non-cash reduction in our operating right-of-use asset, $35.3 million of share of losses from equity method investments, $35.0 million of allowance for credit losses, $33.2 million of net amortization of investment premium and discount and $396.6 million of cumulative changes in operating assets and liabilities.
Cash Flows The following table summarizes our cash flows: Year Ended December 31, 2023 2022 2021 (In thousands) Cash provided by (used in) operating activities $ 414,752 $ (254,368) $ (58,192) Cash provided by (used in) investing activities 228,603 (616,452) (2,489,996) Cash (used in) provided by financing activities (643,610) 45,007 3,096,325 Effect of exchange rate changes on cash, cash equivalents and restricted cash 108 60 (191) Net (decrease) increase in cash, cash equivalents and restricted cash $ (147) $ (825,753) $ 547,946 Cash Flows from Operating Activities In 2023, cash provided by operating activities consisted primarily of our net loss of $1.0 billion adjusted for non-cash items, including $675.9 million of stock-based compensation expense, $284.4 million of depreciation and amortization expense, $320.5 million of impairment of intangible assets and other long-lived assets, $72.9 million amortization of deferred commissions, $27.0 million of non-cash reduction in our operating right-of-use asset, $121.9 million of share of losses from equity method investments, $51.9 million of provision for bad debt and $230.6 million of cumulative changes in operating assets and liabilities.
General and administrative expenses also include costs related to business acquisitions, legal and other professional services fees, certain taxes, depreciation and amortization, charitable contributions and an allocation of our general overhead expenses. We expect that we will incur costs associated with supporting the growth of our business and to meet the increased compliance requirements associated with our international expansion.
General and administrative expenses also include costs related to business acquisitions and dispositions, legal and other professional services fees, certain taxes, depreciation and amortization, charitable contributions and an allocation of our general overhead expenses.
Our arrangements do not contain general rights of return. However, credits may be issued on a case-by-case basis. Credits are accounted for as variable consideration, are estimated based on historical trends and are recorded against revenue. The contracts do not provide customers with the right to take possession of the software supporting the applications.
Non-usage-based contracts revenue is recognized on a ratable basis over the contractual term which is generally from one to three years. Our arrangements do not contain general rights of return. However, credits may be issued on a case-by-case basis. Credits are accounted for as variable consideration, are estimated based on historical trends and are recorded against revenue.
We enter into contracts that can include various combinations of products and services, which are generally capable of being distinct and accounted for as separate performance obligations. Revenue is recognized net of allowances for credits and any taxes collected from customers, which are subsequently remitted to governmental authorities.
We enter into contracts that can include various combinations of products and services, which are generally capable of being distinct and accounted for as separate performance obligations.
Some examples of the usage‑based fees that we charge include fees related to the number of text messages sent or received using our Programmable Messaging, minutes of call duration activity for our Programmable Voice and the number of authentications for Twilio Verify.
The usage-based fees are earned when customers access our cloud-based platform and start using the products. Some examples of our usage-based products are Messaging and Voice. For Messaging products, we primarily charge fees related to the number of text messages sent or received. For Voice products, we primarily charge fees for minutes of call duration.
Unanticipated events and circumstances may occur that may affect the accuracy or validity of such assumptions, estimates or actual results. Recent Accounting Pronouncements Not Yet Adopted See Note 2(af) to the consolidated financial statements included elsewhere in this Annual Report on Form 10-K for a discussion of recent accounting pronouncements not yet adopted. 62 Table of Contents
Recent Accounting Pronouncements Not Yet Adopted See Note 2(af) to the consolidated financial statements included elsewhere in this Annual Report on Form 10-K for a discussion of recent accounting pronouncements not yet adopted.
We believe that our cash, cash equivalents and marketable securities balances, as well as the cash flows generated by our operations, will be sufficient to satisfy our anticipated cash needs for working capital and capital expenditure needs, including authorized share repurchases, for the next 12 months and beyond.
There can be no assurance that additional credit lines or financing instruments will be available in amounts or on terms acceptable to us, if at all. 65 Table of Contents We believe that our cash, cash equivalents and marketable securities balances, as well as the cash flows generated by our operations, will be sufficient to satisfy our anticipated cash needs for working capital and capital expenditure needs, including authorized share repurchases, for the next 12 months and beyond.
Amounts that have been invoiced are recorded in accounts receivable and in revenue or deferred revenue depending on whether the revenue recognition criteria have been met.
The contracts do not provide customers with the right to take possession of the software supporting the applications. Amounts that have been invoiced are recorded in accounts receivable and in revenue or deferred revenue depending on whether the revenue recognition criteria have been met.
However, our belief may prove to be incorrect, and we could utilize our available financial resources sooner than we currently expect.
However, our belief may prove to be incorrect, and we could utilize our available financial resources sooner than we currently expect. We may be required to seek additional equity or debt financing in order to meet our future capital requirements.
Operating Expenses Year Ended December 31, 2022 2021 2020 2021 to 2022 Change 2020 to 2021 Change (Dollars in thousands) Research and development $ 1,079,081 $ 789,219 $ 530,548 $ 289,862 37 % $ 258,671 49 % Sales and marketing 1,248,032 1,044,618 567,407 203,414 19 % 477,211 84 % General and administrative 517,414 472,460 310,607 44,954 10 % 161,853 52 % Restructuring costs 76,636 — — 76,636 100 % — — % Impairment of long-lived assets 97,722 — — 97,722 100 % — — % Total operating expenses $ 3,018,885 $ 2,306,297 $ 1,408,562 $ 712,588 31 % $ 897,735 64 % 2022 compared to 2021 In 2022, research and development expenses increased by $289.9 million, or 37%, compared to the same period last year.
Operating Expenses Year Ended December 31, 2023 2022 2021 2022 to 2023 Change 2021 to 2022 Change (Dollars in thousands) Research and development $ 942,790 $ 1,079,081 $ 789,219 $ (136,291) (13) % $ 289,862 37 % Sales and marketing 1,022,985 1,248,032 1,044,618 (225,047) (18) % 203,414 19 % General and administrative 468,459 517,414 472,460 (48,955) (9) % 44,954 10 % Restructuring costs 165,733 76,636 — 89,097 116 % 76,636 100 % Impairment of long-lived assets 320,504 97,722 — 222,782 228 % 97,722 100 % Total operating expenses $ 2,920,471 $ 3,018,885 $ 2,306,297 $ (98,414) (3) % $ 712,588 31 % 2023 compared to 2022 In 2023, research and development expenses decreased by $136.3 million, or 13%, compared to the same period last year.
In May 2022, we announced our decision to become a remote-first company, giving employees the flexibility to work remotely on a permanent basis.
In 2022, we announced our decision to become a remote-first company, allowing our employees the flexibility to work remotely on a permanent basis. As part of our new operating strategy, we permanently closed several of our offices in 2022 and 2023.
Subscription-based fees are derived from our complex software products, such as Twilio Segment, Twilio Engage, Twilio Flex and certain non-usage-based contracts, such as with the sales of short codes and customer support. Non-usage-based contracts revenue is recognized on a ratable basis over the contractual term which is generally from one to three years.
Platform usage is considered a monthly series comprising one performance obligation and usage-based fees are recognized as revenue in the period in which the usage occurs. Our subscription-based fees are derived from our software products, such as Segment, Engage, Flex, Email and Marketing Campaigns, and certain other non-usage-based contracts, such as with the sales of short codes and customer support.
With our platform, businesses can personalize every transaction with their customers, build lasting loyalty, cut customer acquisition costs and increase customer lifetime value. 47 Table of Contents For a comprehensive overview of our business, our platform and our products refer to Part I, Item 1, “Business,” included elsewhere on this Annual Report on Form 10-K.
For a comprehensive overview of our business, our platform and our products refer to Part I, Item 1, “Business,” included elsewhere in this Annual Report on Form 10-K.
The increase was primarily attributable to a $331.5 million increase in personnel costs, largely as a result of a 74% average increase in sales and marketing headcount, including as a result of acquisitions, as we continued to expand our sales efforts globally.
The increase in operating expenses was primarily attributable to a $67.9 million increase in Segment personnel costs, largely as a result of a 50% increase in average Segment headcount as we continued to focus on enhancing our products and expanding our sales efforts globally, and a $9.1 million increase in advertising costs.
Under the program, we may purchase shares from time to time through open market transactions, privately negotiated transactions, and other means in compliance with applicable securities laws, including through Rule 10b5-1 plans. The program is set to expire on December 31, 2024.
Repurchases under the program will be made through open market, private transactions or other means in compliance with applicable federal securities laws, and could include repurchases pursuant to Rule 10b5-1 trading plans. We have discretion in determining the conditions under which shares may be repurchased from time to time. The program expires on December 31, 2024.
Non‑GAAP Gross Profit and Non‑GAAP Gross Margin For the periods presented, we define non‑GAAP gross profit and non‑GAAP gross margin as GAAP gross profit and GAAP gross margin, respectively, adjusted to exclude, as applicable, certain expenses as presented in the table below: Year Ended December 31, 2022 2021 2020 Reconciliation: (In thousands) GAAP gross profit $ 1,813,577 $ 1,390,713 $ 915,661 GAAP gross margin 47 % 49 % 52 % Non-GAAP adjustments: Share-based compensation 21,136 14,074 8,857 Amortization of acquired intangibles 122,653 114,896 59,501 Payroll taxes related to stock-based compensation 539 — — Non-GAAP gross profit $ 1,957,905 $ 1,519,683 $ 984,019 Non-GAAP gross margin 51 % 53 % 56 % Non‑GAAP Operating Expenses For the periods presented, we define non‑GAAP operating expenses (including categories of operating expenses) as GAAP operating expenses (and categories of operating expenses) adjusted to exclude, as applicable, certain expenses as presented in the table below: Year Ended December 31, 2022 2021 2020 Reconciliation: (In thousands) GAAP operating expenses $ 3,018,885 $ 2,306,297 $ 1,408,562 Non-GAAP adjustments: Share-based compensation (763,149) (618,211) (353,054) Amortization of acquired intangibles (83,528) (83,888) (38,993) Acquisition related expenses (2,621) (7,449) (21,765) Payroll taxes related to stock-based compensation (23,293) (48,417) (27,389) Charitable contribution (9,541) (31,169) (18,993) Restructuring costs (76,636) — — Impairment of long-lived assets (97,722) — — Non-GAAP operating expenses $ 1,962,395 $ 1,517,163 $ 948,368 51 Table of Contents Non‑GAAP (Loss) Income from Operations and Non‑GAAP Operating Margin For the periods presented, we define non‑GAAP (loss) income from operations (which we may refer to as “non-GAAP operating profit” or “non-GAAP profit from operations”) and non‑GAAP operating margin as GAAP loss from operations and GAAP operating margin, respectively, adjusted to exclude, as applicable, certain expenses as presented in the table below: Year Ended December 31, 2022 2021 2020 Reconciliation: (In thousands) GAAP loss from operations $ (1,205,308) $ (915,584) $ (492,901) GAAP operating margin (32) % (32) % (28) % Non-GAAP adjustments: Share-based compensation 784,285 632,285 361,911 Amortization of acquired intangibles 206,181 198,784 98,494 Acquisition related expenses 2,621 7,449 21,765 Payroll taxes related to stock-based compensation 23,832 48,417 27,389 Charitable contribution 9,541 31,169 18,993 Restructuring costs 76,636 — — Impairment of long-lived assets 97,722 — — Non-GAAP (loss) income from operations $ (4,490) $ 2,520 $ 35,651 Non-GAAP operating margin — % — % 2 % 52 Table of Contents Factors Affecting Our Performance We believe that the future success of our business and our results of operations may be significantly affected by many factors, including the factors described below and those outlined in Part II, Item 1A, “Risk Factors.” Usage-Based Fees.
Non‑GAAP Gross Profit and Non‑GAAP Gross Margin For the periods presented, we define non‑GAAP gross profit and non‑GAAP gross margin as GAAP gross profit and GAAP gross margin, respectively, adjusted to exclude, as applicable, certain expenses as presented in the table below: Year Ended December 31, 2023 2022 2021 Reconciliation: (In thousands) GAAP gross profit $ 2,043,930 $ 1,813,577 $ 1,390,713 GAAP gross margin 49 % 47 % 49 % Non-GAAP adjustments: Stock-based compensation 26,343 21,136 14,074 Amortization of acquired intangibles 113,266 122,653 114,896 Payroll taxes related to stock-based compensation 699 539 — Non-GAAP gross profit $ 2,184,238 $ 1,957,905 $ 1,519,683 Non-GAAP gross margin 53 % 51 % 53 % Non‑GAAP Operating Expenses For the periods presented, we define non‑GAAP operating expenses (including categories of operating expenses) as GAAP operating expenses (and categories of operating expenses) adjusted to exclude, as applicable, certain expenses as presented in the table below: Year Ended December 31, 2023 2022 2021 Reconciliation: (In thousands) GAAP operating expenses $ 2,920,471 $ 3,018,885 $ 2,306,297 Non-GAAP adjustments: Stock-based compensation (636,499) (763,149) (618,211) Amortization of acquired intangibles (79,041) (83,528) (83,888) Acquisition and divestiture related expenses (5,555) (2,621) (7,449) Loss on net assets divested (32,277) — — Payroll taxes related to stock-based compensation (12,286) (23,293) (48,417) Charitable contributions (17,346) (9,541) (31,169) Restructuring costs (165,733) (76,636) — Impairment of long-lived assets (320,504) (97,722) — Non-GAAP operating expenses $ 1,651,230 $ 1,962,395 $ 1,517,163 57 Table of Contents Non‑GAAP Income (Loss) from Operations and Non‑GAAP Operating Margin For the periods presented, we define non‑GAAP income (loss) from operations and non‑GAAP operating margin as GAAP income (loss) from operations and GAAP operating margin, respectively, adjusted to exclude, as applicable, certain expenses as presented in the table below: Year Ended December 31, 2023 2022 2021 Reconciliation: (In thousands) GAAP loss from operations $ (876,541) $ (1,205,308) $ (915,584) GAAP operating margin (21) % (32) % (32) % Non-GAAP adjustments: Stock-based compensation 662,842 784,285 632,285 Amortization of acquired intangibles 192,307 206,181 198,784 Acquisition and divestiture related expenses 5,555 2,621 7,449 Loss on net assets divested 32,277 — — Payroll taxes related to stock-based compensation 12,985 23,832 48,417 Charitable contributions 17,346 9,541 31,169 Restructuring costs 165,733 76,636 — Impairment of long-lived assets 320,504 97,722 — Non-GAAP income (loss) from operations $ 533,008 $ (4,490) $ 2,520 Non-GAAP operating margin 13 % — % — % 58 Table of Contents Results of Operations The following table sets forth our results of operations for the periods presented.
In the years ended December 31, 2022, 2021, and 2020, our 10 largest Active Customer Accounts generated an aggregate of 12%, 11% and 14% of our total revenue, respectively.
In the years ended December 31, 2023, 2022, and 2021, our 10 largest Active Customer Accounts generated an aggregate of 10%, 12% and 11% of our total revenue, respectively. Recent Developments Business Unit Reorganization. In February 2023, we began operating our business in two business units: Twilio Communications (“Communications”) and Twilio Data & Applications (“Data & Applications”).
Refer to Note 8, Note 13 and Note 16(a) to our consolidated financial statements included elsewhere in this Annual Report on Form 10-K for discussions of our obligations and commitments related to leases, debt and other purchase obligations. 59 Table of Contents We may, from time to time, consider acquisitions of, or investments in, complementary businesses, products, services, capital infrastructure or technologies which might affect our liquidity requirements, cause us to secure additional financing or issue additional equity or debt securities.
We may, from time to time, consider acquisitions of, or investments in, complementary businesses, products, services, capital infrastructure or technologies which might affect our liquidity requirements or cause us to secure additional financing or issue additional equity or debt securities.
We evaluate our estimates and assumptions on an ongoing basis. Our estimates are based on historical experience and various other assumptions that we believe to be reasonable under the circumstances. Our actual results could differ from these estimates.
GAAP. The preparation of these consolidated financial statements requires us to make estimates and assumptions that affect the reported amounts of assets, liabilities, revenue, expenses and related disclosures. We evaluate our estimates and assumptions on an ongoing basis. Our estimates are based on historical experience and various other assumptions that we believe to be reasonable under the circumstances.
For further detail refer to Note 6 to our consolidated financial statements included elsewhere in this Annual Report on Form 10-K. In 2022, we incurred $97.7 million in impairment charges related to our operating lease assets and other long-lived assets. The impairment charges were triggered by the office closures in 2022.
For further detail refer to Note 7 to our consolidated financial statements included elsewhere in this Annual Report on Form 10-K. In 2023, impairment of long-lived assets increased by $222.8 million, or 228%, compared to the same period last year.
A single organization may constitute multiple unique Active Customer Accounts if it has multiple account identifiers, each of which is treated as a separate Active Customer Account. We believe that the number of Active Customer Accounts is an important indicator of the growth of our business, the market acceptance of our platform and future revenue trends.
We believe that the number of Active Customer Accounts, on an aggregate basis and at the segment level, is an important indicator of the growth of our business, the market acceptance of our platform and future revenue trends.
In 2020, U.S. revenue and international revenue represented $1.3 billion, or 73%, and $479.6 million, or 27%, respectively, of total revenue.
In 2023, U.S. revenue and international revenue represented $2.8 billion, or 66%, and $1.4 billion, or 34%, of total revenue, respectively.
These increases were partially offset by a $21.6 million decrease in charitable contribution expense that we made through Twilio.org. In 2022, we incurred $76.6 million in restructuring costs as a result of the September Plan approved by the compensation and talent management committee of our board of directors during the third quarter of 2022.
These increases were partially offset by a $21.6 million decrease in charitable contribution expense that we made through Twilio.org. In 2022, we incurred $76.6 million in restructuring costs as a result of restructuring activities undertaken in September 2022, as described in Note 7 to our consolidated financial statements included elsewhere in this Annual Report on Form 10-K.
The timing, manner, price and amount of any repurchases are determined by us at our discretion and depend on a variety of factors, including legal requirements, price and economic market conditions. 2029 Notes and 2031 Notes In March 2021, we issued and sold $1.0 billion aggregate principal amount of senior notes, consisting of $500.0 million principal amount of 3.625% notes due 2029 (the “2029 Notes”) and $500.0 million principal amount of 3.875% notes due 2031 (the “2031 Notes,” and together with the 2029 Notes, the “Notes”).
As of December 31, 2023, approximately $327.9 million of the originally authorized amount remains available for future repurchases. 2029 Notes and 2031 Notes In March 2021, we issued and sold $1.0 billion aggregate principal amount of senior notes, consisting of $500.0 million principal amount of 3.625% notes due 2029 (the “2029 Notes”) and $500.0 million principal amount of 3.875% notes due 2031 (the “2031 Notes,” and together with the 2029 Notes, the “Notes”).
Revenue from acquisitions does not impact the Dollar-Based Net Expansion Rate calculation until the quarter following the one-year anniversary of the applicable acquisition, unless the acquisition closing date is the first day of a quarter. 48 Table of Contents We believe that measuring Dollar-Based Net Expansion Rate provides a more meaningful indication of the performance of our efforts to increase revenue from existing customers.
Revenue from acquisitions does not impact the Dollar-Based Net Expansion Rate calculation until the quarter following the one-year anniversary of the applicable acquisition, unless the acquisition closing date is the first day of a quarter. As a result, for the year ended December 31, 2023, our Dollar-Based Net Expansion Rate excludes the contributions from acquisitions made after October 1, 2022.
The increase in cost of revenue was primarily attributable to a $465.5 million increase in network service providers’ costs, which included the additional A2P fees imposed by certain carriers, and a $44.2 million increase in cloud infrastructure fees, all to support the growth in usage of our products.
The increase in Communications cost of revenue was primarily attributable to a $477.0 million increase in network service providers’ costs, including the impact of hedging instruments, a $30.7 million increase in hosting fees, and a $14.7 million increase in support costs, all of which supported the growth in usage of our products by new and existing customers.
For more details on the nature of this transaction, accounting treatment and the impact to our financial statements refer to Note 2(w) and Note 10 to our consolidated financial statements included elsewhere in this Annual Report on Form 10-K. Sabbatical Program.
Refer to Note 6, Note 8 and Note 12 to our consolidated financial statements included elsewhere in this Annual Report on Form 10-K for additional information on the restructuring, impairment and segment reporting. 51 Table of Contents Share Repurchase Program.
Year Ended December 31, 2022 2021 2020 Active Customer Accounts (as of end date of period) (1) 290,000 256,000 221,000 Total Revenue (in thousands) (2) $ 3,826,321 $ 2,841,839 $ 1,761,776 Total Revenue Growth Rate (2) 35 % 61 % 55 % Dollar-Based Net Expansion Rate (3) 121 % 131 % 137 % ____________________ (1) Excludes Active Customer Accounts from Zipwhip in 2021 and 2022.
Year Ended December 31, 2023 2022 2021 Active Customer Accounts 305,000 290,000 256,000 Total Revenue (in thousands) $ 4,153,945 $ 3,826,321 $ 2,841,839 Total Revenue Growth Rate 9 % 35 % 61 % Dollar-Based Net Expansion Rate 103 % 121 % 131 % Active Customer Accounts We define an Active Customer Account at the end of any period as an individual account, as identified by a unique account identifier, for which we have recognized at least $5 of revenue in the last month of the period.
Liquidity and Capital Resources As of December 31, 2022, we had cash and cash equivalents of $651.8 million and short-term marketable securities of $3.5 billion. Cash and cash equivalents consist of money market funds, reverse repurchase agreements and commercial paper.
The increase in Segment cost of revenue was primarily attributable to a $10.2 million increase in hosting fees and a $5.8 million increase in support costs. Liquidity and Capital Resources As of December 31, 2023, we had cash and cash equivalents of $655.9 million and short-term marketable securities of $3.4 billion. Cash equivalents consist of money market funds.
The increase in international revenue was attributable to the growth in usage of our products by our existing customers as reflected in our overall Dollar-Based Net Expansion Rate of 121%, as well as a 13% increase in the number of international Active Customer Accounts. 2021 compared to 2020 In 2021, total revenue increased by $1.1 billion, or 61%, compared to the same period in the prior year.
This increase was primarily attributable to a 5% increase in the number of Active Customer Accounts, from over 290,000 as of December 31, 2022 to over 305,000 as of December 31, 2023, as well as the increased usage of our products by our existing customers, as reflected in our Dollar-Based Net Expansion Rate of 103%.
Employees who had already accumulated more than three years of tenure with us as of the program’s effective date became immediately eligible for their sabbatical leaves. As of December 31, 2022, we carried a $30.7 million liability related to this program.
The sabbatical program was intended to provide our tenured employees with a paid leave of four consecutive weeks after every three years of service. Employees who had accumulated more than three years of service as of the program’s effective date became eligible for their benefit immediately.
Cost of Revenue and Gross Margin Year Ended December 31, 2022 2021 2020 2021 to 2022 Change 2020 to 2021 Change (Dollars in thousands) Cost of revenue $ 2,012,744 $ 1,451,126 $ 846,115 $ 561,618 39 % $ 605,011 72 % Gross margin 47 % 49 % 52 % 57 Table of Contents 2022 compared to 2021 In 2022, cost of revenue increased by $561.6 million, or 39%, compared to the same period last year.
In 2021, U.S. revenue and international revenue represented $1.9 billion, or 68%, and $914.5 million, or 32%, of total revenue, respectively. 61 Table of Contents Cost of Revenue and Gross Profit Year Ended December 31, 2023 2022 2021 2022 to 2023 Change 2021 to 2022 Change (Dollars in thousands) Cost of revenue $ 2,110,015 $ 2,012,744 $ 1,451,126 $ 97,271 5 % $ 561,618 39 % Gross profit $ 2,043,930 $ 1,813,577 $ 1,390,713 $ 230,353 13 % $ 422,864 30 % 2023 compared to 2022 In 2023, cost of revenue increased by $97.3 million, or 5%, compared to the same period last year.
The increase in cost of revenue was primarily attributable to a $449.7 million increase in network service providers’ costs and a $36.5 million increase in cloud infrastructure fees, all to support the growth in usage of our products. In 2022, gross margin declined compared to the same period last year.
The increase in Communications cost of revenue was primarily attributable to a $19.5 million increase in hosting fees and a $51.3 million increase in network service providers’ costs, net of the impact of hedging instruments, to support the increase in revenue due to the growth in usage of our products by our new and existing customers. 64 Table of Contents In 2023, Segment non-GAAP loss from operations increased by $42.7 million, or 144%, compared to the same period last year.
In the years ended December 31, 2022, 2021 and 2020, we generated 73%, 72% and 76% of our revenue, respectively, from usage‑based fees.
These contracts may include negotiated terms and typically include minimum revenue commitments of varying durations. Usage-based customers subject to such contracts are typically invoiced monthly in arrears for products used. In the years ended December 31, 2023, 2022 and 2021, we generated 71%, 73% and 72% of our revenue, respectively, from usage-based fees.
Customers gain access to our products and solutions either through an e-commerce self service sign-up format which requires an upfront prepayment via credit card that is drawn down as they use our products; or for our larger customers, including enterprise customers, a negotiated contract is established for at least 12 months that contain minimum revenue commitments and which may contain more favorable pricing.
When our usage-based products are embedded into our subscription-based products, we charge for each product separately on a usage or subscription basis, respectively, and record the revenue in the reportable segment in which each product resides. 54 Table of Contents Most of our usage-based customers gain access to our products and solutions through our e-commerce self-service sign-up format, which requires an upfront prepayment via credit card that is drawn down as they use our products.
The majority of our revenue is derived from usage-based fees that we charge primarily for our communications products, which can lead to variability and at times create significant differences between forecasts and actual results. In addition, our product mix and mix of international and domestic customers may significantly impact our gross margin.
Our revenue is primarily derived from usage-based fees, which can lead to variability in our results of operations and at times create differences between our forecasts and actual results. Our usage-based revenue is also more immediately impacted by changes in consumer spending and macroeconomic conditions than our subscription-based revenue.
Customers on such contracts are typically either invoiced monthly in arrears for products used or invoiced in advance at the start of the term. Amounts that have been charged via credit card or invoiced are recorded in revenue, deferred revenue or customer deposits, depending on whether the revenue recognition criteria have been met.
In the years ended December 31, 2023, 2022 and 2021, we generated 29%, 27% and 28% of our revenue, respectively, from non-usage‑based fees. Amounts that have been charged via credit card or invoiced are recorded in revenue, deferred revenue or customer deposits, depending on whether the revenue recognition criteria have been met.
Additionally, cash from operations could also be affected by various risks and uncertainties in connection with the impact of an economic downturn or recession, significant market volatility in the global economy, timing and ability to collect payments from our customers and other risks detailed in Part I, Item 1A, “Risk Factors.” Share Repurchase Program In February 2023, our board of directors authorized a share repurchase program to repurchase $1.0 billion of our Class A common stock over time.
Our future capital requirements, the adequacy of our available funds and our cash from operations depend on many factors and are affected by various risks and uncertainties, including those set forth in Part I, Item 1A, “Risk Factors.” Share Repurchase Program In February 2023, our board of directors authorized a share repurchase program pursuant to which we may repurchase up to $1.0 billion in aggregate value of our common stock.
In February 2023, our board of directors authorized a share repurchase program to repurchase $1.0 billion of our Class A common stock over time. Under the program, we may purchase shares from time to time through open market transactions, privately negotiated transactions and other means in compliance with applicable securities laws, including through Rule 10b5-1 plans.
Repurchases under this program can be made through open market, private transactions or other means in compliance with applicable federal securities laws and could include repurchases pursuant to Rule 10b5-1 trading plans. We have discretion in determining the conditions under which shares may be repurchased from time to time.
In 2021, sales and marketing expenses increased by $477.2 million, or 84%, compared to the same period in the prior year.
In 2022, U.S. revenue and international revenue represented $2.5 billion, or 66%, and $1.3 billion, or 34%, of total revenue, respectively. 2022 compared to 2021 In 2022, Communications revenue increased by $909.2 million, or 34%, compared to the same period in the prior year.
The increase was also due to a $43.6 million increase related to the amortization of acquired intangible assets and a $31.6 million increase in advertising expenses. In 2021, general and administrative expenses increased by $161.9 million, or 52%, compared to the same period in the prior year.
This increase was partially offset by a $62.9 million decrease in impairments of operating right-of-use assets and property and equipment due to fewer office closures in 2023 compared to 2022. 2022 compared to 2021 In 2022, research and development expenses increased by $289.9 million, or 37%, compared to the same period in the prior year.
In 2021, cash used in investing activities was $2.5 billion primarily consisting of $1.9 billion of purchases of marketable securities and other investments, net of maturities and sales, $491.5 million of net cash paid to acquire other businesses as described in Note 9 to our consolidated financial statements included elsewhere in this Annual Report on Form 10-K, $44.0 million related to capitalized software development costs and $46.0 million related to purchases of long-lived assets.
Cash Flows from Investing Activities In 2023, cash provided by investing activities was $228.6 million primarily consisting of $247.4 million of maturities and sales of marketable securities and other investments, net of purchases, and $38.2 million of proceeds from divestitures, net of cash divested, partially offset by $39.9 million related to capitalized software development costs and $11.3 million related to purchases of long-lived assets.
We have included Zipwhip in our results of operations prospectively after its closing date of July 14, 2021; Twilio Segment after its closing date of November 2, 2020; and all other acquisitions from the respective closing dates of each acquisition. The period-to-period comparison of our historical results are not indicative of the results that may be expected in the future.
The period-to-period comparison of our historical results are not indicative of the results that may be expected in the future.
For further details on this event refer to Note 6 to our consolidated financial statements included elsewhere in this Annual Report on Form 10-K. In February 2023, we committed to a workforce reduction plan (the “February Plan”), that in addition to the September Plan, is intended to reduce operating costs, improve operating margins, and accelerate profitability.
For additional details refer to Note 7 to our consolidated financial statements included elsewhere in this Annual Report on Form 10-K. Sabbatical Program. In February 2023, we announced that we will be sunsetting our employee sabbatical program that we introduced effective July 1, 2022.
The increase was primarily attributable to a $142.1 million increase in personnel costs, largely as a result of a 75% average increase in general and administrative headcount, including as a result of acquisitions, to support the growth of our business globally.
The decrease was primarily attributable to a $78.1 million decrease in total personnel costs, which was mostly driven by the restructuring of our workforce in September 2022, February 2023 and December 2023, that contributed to a 21% decrease in average general and administrative headcount in 2023.