So, you’ve landed on the alien planet ofFactorio. You’ve got smelting set up, you’ve dabbled in laboratory research, and you maybe even have some trains running. But now, you’ve come to a roadblock — you need oil for the Chemical Science Packs, cars, and almost everything else you want to be doing next. Where do you get started?

Here we will cover where you can find oil, how you can extract it, and what is the most optimal way to process it. Also, you’ll find some more advanced setups for late-game factories that can complete these ratios perfectly. Let’s dive in.

The pink squares found on the map, that signify that there is oil in this spot in Factorio.

Where To Find Oil

Oil can be found all around the map, though it frequentlyspawns far from where your spaceship crashed. On the map, it appears aspink squares, and hovering over them reveals that they are what’s called “Crude oil”, with acertain combined yield.

The combined yield here tells youhow much oil you can extract per second, with the calculation being: 100 percent yield = ten crude oil per second, 200 percent yield = 20 crude oil per second, and so on.

A setup with five pumpjacks, extracting oil from the ground in Factorio.

Each pink square on the map representsan oil tile, meaning you can put pumpjacks on it.

How To Extract Oil

To extract oil and turn it into something useful,you’re going to need pumpjacks. Every oil tile can only have one pumpjack, and there are no other ways to extract oil other than using those.

Once the pumpjack is placed, it will start outputtingas much oil as the yield of the tile is, plus any modules that you put in it and any “Mining productivity” research you’ve done beforehand.

A player standing in front of an oil refinery in Factorio.

You can put a pumpjack on every oil tile, and they will automatically start outputting oil into any pipe connected to their outputs as long as there is power.

When you’re done doing this, it’s not a bad idea toput a storage tank or two at the end, so that the oil can accumulate for future processing.

A setup that takes in oil gathered by pumpjacks, and turns it into petroleum gas for future use in Factorio.

How To Refine Oil

Alright, so now that you’ve got oil, it’s time torefine it into something useful. This will be done by usingoil refineries.

As every map generates content differently, now is the time to decide where this refining and processing will be done:at the oil spot, or back at your factory.

An oil refinery, processing the oil with advanced oil processing in Factorio.

If you choose the first option, the oil refinery part of your factory will becomeits own excluded system, outputting only the items required for research.

If you choose the latter option, however, you’ll need to deliver the raw oil to the factory and thenrefine it from there, but you won’t need a lot of planning in advance.

A beginner setup for advanced oil processing with a semi-efficient output, in Factorio.

In both cases, you’ll need defenses and eithera line of belts or pipesleading to your factory, or, more preferably,a train that can deliver large quantities of items or fluidsat a time for cheap.

No matter which one you decide on, there aretwo ways to process oil:

The most optimal setup for cracking down oils into petroleum, with advanced oil processing in Factorio.

How To Make A Basic Oil Processing Setup

The raw oil mustbe first inputted to anoil refinery. In the oil refinery menu, select “Basic oil processing”, and the machine will be ready to take in fluids.

Enable Alt-modeto seewhich port in the refinery takes inthe oil. If the refinery requests oil in an inconvenient port,you can flip it— check the in-game settings to see the shortcut to do so.

The process takes in 100 crude oil to convert into 45 petroleum gas, and takes five seconds to complete. Then, this machinetakes 20 oil and outputs nine petroleum, so take a look across your pumpjacks andadd up the amount of oil they all output per secondto see how many refineries you’re going to need.

If, for example, you’re making 100 oil per second, you’ll need five refineries to process all of it.

Always try toproduce more oil than you’re convertinginto petroleum. If you’re making 123 oil per second, for example,don’t use seven refineriesto refine it all, anduse six insteadto refine 120 oil per second, leaving the remainder to be stored in a buffer storage tank. That extra oil will come in handy if you ever want tomake some flamethrower ammo, as it’s the only recipe in the game other than oil barrels that specifically requires crude oil in the recipe.

Once you’ve got the setup running, you can take all the petroleum from the refineries and send it forwardinto chemical plants.

Chemical plants are themain assembling machinesfor this operation, as these are the machines that make items that can be put on belts. Petroleum gas can be transformed into plastic and sulfur from here, to be used in future recipes.

Keep note ofhow much each chemical plant takes in, so that you don’t end up making less petroleum than you need.

How To Make An Advanced Oil Processing Setup

Shortly after you’ve made the basic oil processing setup, you willresearch the far superior advanced oil processingoption for oil refineries.

This setup is more complicated, but will createmore materials for the same amount of oil provided.

Advanced oil processing has the following recipe with a five-second crafting time: 50 Water and 100 Crude oil → 25 Heavy oil, 45 Light oil, and 55 Petroleum gas.

As you may see, there are now more products than just petroleum — this is a problem, becausethe whole system will clog up if we don’t store or use up every product created.

Thankfully, there is an optimal solution, but it requires a very specific setup.

Beginner Setup

If you want to have any light and heavy oil for future use, you can simplysupply the water with an offshore pumpand use a similar layout you used in the basic oil processing setup, except they’ll each need to be separated by one tile.

Pipes cannot be connected if theyhouse different fluids, so you’ll need to experiment with underground pipes to find the optimal layout for your factory, as those can be placed next to one another without the fluids interacting.

Then, once you have each of these placed down, the outputs can be sorted intothree lanes connected into storage tank buffersat the end.

As it still takes 20 oil per second, you can simply change the old recipe for the new one, rework the pipes, and voilà! Now you have both light and heavy oil to use as you please.

This setup will stop working from time to time. This is because the storage tanks will fill up with one of the three products, in which case you’ll either have totake out the storage tankthat’s full and place it down again to have it empty — or simplyplace more storage tanksin the sequence.

Optimal Setup

Getting more into the math side of things, we can see thatwe are making five heavy oil per second and nine light oil per second.

In chemical plants, researching advanced oil processing also unlocks the option ofcracking down oils into petroleumwith water.

If we ever havean excess of a certain product, we can turn it into petroleum, which will almost always be used up — and if it isn’t, the oil process will just resume when storage isn’t full.

For this following setup,you can process up to 400 oil per second, in which case you can set up a train system that will deliver the oil back to your factory from an oil spot somewhere in the world.

This setup includes the following:

The inputs are on the left, being crude oil and water, and they both get sent down the lane of oil refineries. These can be flipped, allowing the products to all be shipped inthree lanes of pipes.

We can add buffer tanks on the right, so we canstore some of the productsfor later use, and we canuse a green wireto connect tanks with pumps that will only allow the liquid to be pumped if the tanks are almost full.

Then, these three getsent to the chemical plants, where we can put a lane of water that will let uscrack heavy oil down into light oil, and following that,crack down the light oil into petroleum.

The ratio here is key, as these refineries will be perfectly supplying these chemical plants, up to the point where we’re making a lot more than 400 oil per second, in which case this setup can be copy-pasted to another location.

If this sounds intimidating to build, don’t worry! We’ve got you covered with theblueprint for the optimal setup, which you can insert into your game bypressing the “import string” buttonon your hotbar, and thencopy-pasting this text:

0eNrFXU1zG7kR/SssniVn8A3okKpcUpV7bpstFy2NbdZSpMIPJ64t//fMDL3yOFGr32uF0okeUX5qNB4wAPqh+/flh82pf9ivt8flze/Lu/5wu18/HNe77fJm+ffP/eJ+dzgudsNP7lebxaE/nh4WH3f7xeruy2p7298tduvN4mG/u+0Ph/X202K9Xfx1dXvc7de7d//Y/u24OK5+6w/jj1eL+9W/1/en+8Xu4yJ23fg//3S4Wqy2A8jp+HA6HharD8O/pi8f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