The New Economic Mechanism (NEM) (Hungarian: Új gazdasági mechanizmus) was a major economic reform launched in the People's Republic of Hungary in 1968. Between 1972 and 1978, it was curtailed by the prevailing winds of Eastern Bloc politics. During the subsequent decade, until the revolutions of 1989 ended the era, the NEM's principles continued to affect the Hungarian economy, even in cases where the "NEM" name was not emphasized. Because of the NEM, Hungary in the 1980s had a higher ratio of market mechanisms to central planning than any other Eastern Bloc economy. The ratio was different to an extent that was politically challenging to bring about in the Soviet sphere because of the ideological mixture it required. The name Goulash Communism was jokingly (but tellingly) applied to this mixture. The Hungarian economy under the influence of NEM principles was widely viewed as outperforming other Eastern Bloc economies, making Hungary "the happiest barrack" in barracks communism. Many Soviet and Eastern European people enjoyed going to Hungary (for example, on work assignments or on vacations) because of the economic and cultural environment there.
 The tensions and harmonies between market mechanisms and central planning, with neither having sole control, are a perennial challenge in all societies that temper capitalism with socialism or vice versa. In some ways Hungary's economic reform channels comparisons with the Chinese economic reform, in the sense that both were qualitative challenges to a Stalinist type of system—and thus that such reforms were not politically feasible in most of the Eastern Bloc.
 The period from 1956–1968 was one of reform in Eastern Europe. The beginning of these transformations was marked by the Hungarian Revolution of 1956, which resulted in János Kádár’s placement as the communist leader of the People's Republic of Hungary and the creation of the Hungarian Socialist Workers' Party (HSWP). For the first ten years of his rule, Kádár’s objective was to create a united Hungary, announcing in December 1961 that "those who are not against us are with us." 
 Kádár also focused his attention on economic improvement. On 7 May 1966, the Central Committee of the HSWP announced Kádár's plans for the reform of the economy, known as the New Economic Mechanism (NEM).  The reform is considered as "the most radical postwar change" of any Comecon country. The plan, which became official 1 January 1968, was a major shift to decentralization in an attempt to overcome the inefficiencies of central planning. The NEM represented a move away from the Soviet economic system of compulsory plan indicators in favor of a policy that states profits as the enterprise's main goal. The new economic policy was a "comprehensive reform of the economic system", creating market relationships among firms, using prices as allocative functions and firms responding to prices to maximize profits, and using profits to budget new investments.
 The Central Committee's document on 7 May 1966 details changes in the firm's role under the new economic policy. The reform gave producers the freedom to decide what and how much they produce and offer for sale and to establish commercial or co-operative relationships. Buyers were also given the freedom to choose between domestic goods and imports. Additionally, firms were given greater autonomy in carrying out investments and hiring labor. As dictated by the Central Committee, success is to be measured by a firm's profitability. The decentralized structure of the New Economic Mechanism marked an improvement in the decision making process, allowing for basic decisions to be made at the local level without information having to be transmitted upward for a more centralized decision.  The Hungarian government made 50.5% (enterprises 49.5%) of the investment decisions for the 68 billion forint invested in 1968, while in 1974 enterprises accounted for 53.1% of the decisions for the 128 billion forint invested.
 The New Economic Mechanism also aimed to create a more active role for prices.  A system of free prices reflecting market conditions was implemented. The government wanted flexibility, but also to combat inflation. To do so, they introduced a new practice of price controls declaring an item's price as fixed, limited, or free.
 Fixed prices were classified as material and basic intermediate goods. The price was fixed because of the good's impact on the economy and the overall need to ensure stability. The price was determined by ministries.
 Limited prices referred to particular products or products in some product group for which there were no substitutes, such as bread. It was applied on the average price over a period or a window within which prices were free to fluctuate.
 Free prices were assigned to goods that formed small parts of individual expenditures or were regarded as luxuries.
 The price reform allowed for prices better to reflect the cost of production and the valuation by the market, and to correspond more closely to "some measure of socially necessary inputs", helping reach market equilibrium.
 The goal of the New Economic Mechanism consisted of improving Hungary's economy to make Hungary a serious contributor to the international economy. In 1966 the Soviet Union accounted for 32% of Hungary's exports and 29% of its imports. Of Hungary's exports to Western Developed Countries, 42.7% was Food and Live Animals, 43.5% Manufactured Goods. Meanwhile, trade with Socialist Countries consisted largely of Manufactured Goods (81.3%). Conversely, Hungary's imports from the West were primarily Manufactured Goods (70.6%). Because of the pre-existing quota system which placed an emphasis on quantity, not quality, Hungarian goods were inferior and did not meet Western technological standards.
 Decentralization provided enterprises with the opportunity to better align with the world market by giving them more freedom in deciding which products and technologies to invest in and manufacture. Additionally, firms were paid for exports in the Hungarian currency equivalent of the foreign currency they earned, as the government aimed to involve enterprises in foreign markets and in improving the quality of goods produced. The new plan established direct connections between the foreign and domestic markets on the basis of an appropriate exchange rate. The primary concern of the New Economic Mechanism was in improving foreign trade and establishing a relationship between success in exportation and a firm's profitability.