Answer by taking a quote from the following article:

Andrew Carnegie ( kar-NAY-gee, but commonly KAR-n@-ghee or kar-NEG-ee; November 25, 1835 - August 11, 1919) was a Scottish-American industrialist, business magnate, and philanthropist. Carnegie led the expansion of the American steel industry in the late 19th century and is often identified as one of the richest people (and richest Americans). He became a leading philanthropist in the United States and in the British Empire. During the last 18 years of his life, he gave away about $350 million to charities, foundations, and universities--almost 90 percent of his fortune.

In 1864, Carnegie invested $40,000 in Story Farm on Oil Creek in Venango County, Pennsylvania. In one year, the farm yielded over $1,000,000 in cash dividends, and petroleum from oil wells on the property sold profitably. The demand for iron products, such as armor for gunboats, cannons, and shells, as well as a hundred other industrial products, made Pittsburgh a center of wartime production. Carnegie worked with others in establishing a steel rolling mill, and steel production and control of industry became the source of his fortune. Carnegie had some investments in the iron industry before the war. After the war, Carnegie left the railroads to devote all his energies to the ironworks trade. Carnegie worked to develop several iron works, eventually forming the Keystone Bridge Works and the Union Ironworks, in Pittsburgh. Although he had left the Pennsylvania Railroad Company, he remained closely connected to its management, namely Thomas A. Scott and J. Edgar Thomson. He used his connection to the two men to acquire contracts for his Keystone Bridge Company and the rails produced by his ironworks. He also gave stock to Scott and Thomson in his businesses, and the Pennsylvania was his best customer. When he built his first steel plant, he made a point of naming it after Thomson. As well as having good business sense, Carnegie possessed charm and literary knowledge. He was invited to many important social functions--functions that Carnegie exploited to his own advantage. Carnegie believed in using his fortune for others and doing more than making money. He wrote: I propose to take an income no greater than $50,000 per annum! Beyond this I need ever earn, make no effort to increase my fortune, but spend the surplus each year for benevolent purposes! Let us cast aside business forever, except for others. Let us settle in Oxford and I shall get a thorough education, making the acquaintance of literary men. I figure that this will take three years active work. I shall pay especial attention to speaking in public. We can settle in London and I can purchase a controlling interest in some newspaper or live review and give the general management of it attention, taking part in public matters, especially those connected with education and improvement of the poorer classes. Man must have no idol and the amassing of wealth is one of the worst species of idolatry! No idol is more debasing than the worship of money! Whatever I engage in I must push inordinately; therefore should I be careful to choose that life which will be the most elevating in its character. To continue much longer overwhelmed by business cares and with most of my thoughts wholly upon the way to make more money in the shortest time, must degrade me beyond hope of permanent recovery. I will resign business at thirty-five, but during these ensuing two years I wish to spend the afternoons in receiving instruction and in reading systematically!

How much did they make from the oil?
the farm yielded over $1,000,000 in cash dividends,