How to Get Real-Time Oil Prices in Excel (3 Methods + Free Add-In)
Learn how to automatically get live oil prices in Excel using our free add-in, Power Query, or API. Includes WTI, Brent, and natural gas formulas. No VBA or programming required.
The Problem with Manual Oil Price Updates
If you're an energy trader, financial analyst, or work in procurement, you've probably spent countless hours manually updating oil prices in Excel. The routine is familiar: open Bloomberg or an energy news site, copy the latest WTI price, switch to Excel, paste it into the right cell, and repeat for Brent, natural gas, and diesel. Every. Single. Morning.
This manual workflow costs you 15-30 minutes per day. That's 2.5 hours per week—time you could spend analyzing trends, building better models, or making trading decisions. Worse, manual updates are error-prone. Copy the wrong price, paste into the wrong cell, or forget to update entirely, and suddenly your financial model is using yesterday's data.
The good news? There's a better way. In this guide, I'll show you three methods to get real-time oil prices in Excel automatically—from simple copy-paste improvements to fully automated solutions that update prices every 5 minutes without lifting a finger.
What You'll Learn
- ✓ Three methods to get oil prices in Excel (manual, Power Query, and add-in)
- ✓ Step-by-step setup for each approach with code examples
- ✓ Which method works best for your use case
- ✓ Real-world examples from energy traders and analysts
- ✓ Troubleshooting tips for common issues
Whether you're tracking WTI-Brent spreads for arbitrage, building DCF models for oil companies, or managing fuel procurement budgets, this guide has you covered. Let's start with the method most people use today—and why it's time to upgrade.
Method 1: Manual Copy-Paste (The Old Way)
This is how most people get oil prices into Excel today. You visit an energy website, highlight the price, copy it (Ctrl+C), switch to Excel, and paste it (Ctrl+V) into your spreadsheet. Simple enough for one price. But what if you need WTI, Brent, Natural Gas, RBOB Gasoline, Heating Oil, and Diesel?
Suddenly, you're juggling multiple browser tabs, copying and pasting six times, and hoping you didn't accidentally paste Brent prices into the WTI column. The process looks like this:
- Open Bloomberg, Investing.com, or trading platform
- Find WTI crude oil price
- Copy the price value
- Switch to Excel
- Navigate to the correct cell (hopefully)
- Paste the value
- Repeat 5-10 more times for other commodities
Problems with Manual Updates
- ⏱️ Time-Consuming: 15-30 minutes daily adds up to 125+ hours per year
- ❌ Error-Prone: Easy to paste into wrong cells or miss updates entirely
- 📉 Stale Data: Prices only update when you remember to check
- 🚫 Not Scalable: Impossible to track 50+ commodities this way
- 🔄 No Automation: Can't trigger calculations based on price movements
If you're only checking oil prices once a week for general awareness, manual copy-paste works fine. But if you're making trading decisions, building financial models, or managing procurement, you need something better. Let's look at automated solutions.
Method 2: Using Power Query (The Technical Way)
Power Query is Excel's built-in data import tool. It can fetch data from web APIs, databases, and files. If you're comfortable with Excel's advanced features and want full control over your data pipeline, this method gives you flexibility without installing add-ins.
Step-by-Step Setup
Step 1: Get Your API Key
First, you need access to an oil price API. Sign up at oilpriceapi.com to get a free API key with 100 API requests included.
Step 2: Open Power Query
- In Excel, go to the Data tab
- Click Get Data → From Other Sources → From Web
- Choose Advanced mode
Step 3: Configure API Request
Enter the API URL for the commodity you want:
https://api.oilpriceapi.com/v1/prices/latest?by_code=BRENT_CRUDE_USDAdd your authorization header:
- Header Name: Authorization
- Header Value: Token YOUR_API_KEY_HERE
Step 4: Transform the JSON Response
Power Query will open with the JSON data. You'll need to extract the price value:
- Click Convert to Table
- Expand the data column
- Expand the price field
- Remove unnecessary columns
- Click Close & Load
Step 5: Refresh the Data
Right-click the query in the Queries & Connections pane and select Refresh to update prices.
Advanced: Power Query M Code
For Excel power users, here's the M language code you can paste directly into the Advanced Editor:
let
Source = Json.Document(
Web.Contents(
"https://api.oilpriceapi.com/v1/prices/latest",
[
Headers=[
Authorization="Token YOUR_API_KEY_HERE",
#"Content-Type"="application/json"
],
Query=[by_code="BRENT_CRUDE_USD"]
]
)
),
data = Source[data],
price = data[price],
ConvertedToTable = Table.FromRecords({[Price=price]})
in
ConvertedToTablePros and Cons
✅ Advantages
- No add-in installation required
- Full control over data transformation
- Works in Excel 2016 and newer
- Can combine multiple data sources
- Free to use (just need API key)
❌ Disadvantages
- Complex setup (15-20 steps)
- Requires Power Query knowledge
- Manual refresh needed
- Not formula-based
- Hard to maintain for many commodities
Best for: Data engineers, Excel power users who need one-time data imports, or teams that want to avoid add-ins for security reasons. If you're looking for something simpler, keep reading.
Method 3: Excel Add-In (The Easy Way) ⭐ RECOMMENDED
This is the method we recommend for 90% of users. Instead of complex Power Query setups or daily copy-paste routines, you install a lightweight Excel add-in that gives you simple formulas like=OILPRICE.LATEST("WTI_USD").
Prices update automatically every 5 minutes. No VBA macros. No programming. Just clean, Excel-native formulas that work like =SUM() or =VLOOKUP().
Why This Method Wins
- ✓ 2-minute setup vs 20 minutes for Power Query
- ✓ Works like native Excel - no technical knowledge needed
- ✓ Auto-refresh built-in - prices update every 5 minutes
- ✓ 100 free API requests - perfect for testing and personal use
- ✓ 100+ commodities - WTI, Brent, natural gas, gold, and more
Installation (Step 1 of 3)
Installing the Oil Price API Excel add-in takes about 30 seconds:
- Go to oilpriceapi.com/excel
- Click the "Install Free Add-In" button
- Excel will open automatically and show an installation dialog
- Click "Get It Now" to confirm
- The add-in appears in your Excel sidebar (usually on the right)
The add-in works in Excel 2016 and newer on both Windows and Mac, plus Excel Online (Office 365). No administrator privileges required.
Getting Your API Key (Step 2 of 3)
The add-in needs an API key to fetch prices. Here's how to get yours:
- In the Excel sidebar, click "Get Free API Key"
- You'll be redirected to oilpriceapi.com/auth/signup
- Sign up with your email and password (takes 30 seconds)
- Copy your API key from the dashboard (looks like:
3839c085...) - Paste it into the Excel sidebar
- Click "Save Key"
Free Tier: Your API key includes 100 lifetime API requests at no cost. No credit card required. That's enough to check 5 prices daily for over 3 months.
Using the Formulas (Step 3 of 3)
Now for the fun part. With the add-in installed and your API key saved, you can start using oil price formulas in any Excel cell.
Basic Formula: Get Current Price
=OILPRICE.LATEST("BRENT_CRUDE_USD")Returns: $82.30
The price updates automatically every 5 minutes during trading hours. No need to refresh manually.
Available Commodities
The add-in supports over 100 energy commodities and related products:
BRENT_CRUDE_USD - Brent Crude OilWTI_USD - West Texas IntermediateNATURAL_GAS_USD - Henry Hub Natural GasGASOLINE_USD - RBOB GasolineDIESEL_USD - ULSD DieselHEATING_OIL_USD - Heating OilPROPANE_USD - PropaneCOAL_USD - Coal FuturesSee the full commodity code list for all available options including refined products, international benchmarks, and carbon credits.
Advanced Formula Examples
Get Historical Prices:
=OILPRICE.HISTORY("WTI_USD", "2024-01-01", "2024-12-31")Returns: Array of daily prices for the entire year
Calculate WTI-Brent Spread:
=OILPRICE.LATEST("BRENT_CRUDE_USD") - OILPRICE.LATEST("WTI_USD")Returns: $3.85 (spread in dollars)
Convert Energy Units:
=OILPRICE.CONVERT("BRENT_CRUDE_USD", "barrel", "MBtu")Returns: Price converted from $/barrel to $/MBtu
Build Trading Signals:
=IF(OILPRICE.LATEST("BRENT_CRUDE_USD") - OILPRICE.LATEST("WTI_USD") > 4, "TRADE", "HOLD")Returns: "HOLD" or "TRADE" based on spread
Auto-Refresh Settings
The add-in refreshes prices automatically, but you have full control:
- Automatic: Prices update every 5 minutes during trading hours
- On Open: Fresh prices load when you open the workbook
- Manual: Click "Refresh Prices" in the sidebar anytime
- Disable Auto-Refresh: Toggle the setting if you prefer manual control
💡 Pro Tip: Check Request Usage
The sidebar shows your current usage (e.g., "45 / 100 requests used"). Each formula refresh counts as one request. To conserve requests, reduce auto-refresh frequency or manually refresh only when needed.
That's it! You now have real-time oil prices flowing into Excel with simple, maintainable formulas. No more copy-paste. No more stale data. Just accurate, up-to-date commodity prices at your fingertips.
Method Comparison: Which Should You Choose?
All three methods work, but they're optimized for different use cases. Here's an honest comparison to help you decide:
| Feature | Manual Copy-Paste | Power Query | Excel Add-In |
|---|---|---|---|
| Setup Time | 0 minutes | 15-20 minutes | 2 minutes |
| Technical Skill | None | Advanced | Basic Excel |
| Formula Support | No | No | ✓ Yes |
| Auto-Refresh | No | Manual only | ✓ Every 5 min |
| Historical Data | No | Yes (manual) | ✓ Yes (formula) |
| Cost | Free | Free (needs API) | Free tier available |
| Daily Time Cost | 15-30 min | 2-5 min | 0 min |
| Scalability | 1-5 prices | 5-20 prices | 100+ prices |
| Best For | Quick checks | One-time imports | Daily use |
💡 Our Recommendation
For most users, the Excel Add-In is the best choice. It's easier to set up than Power Query, automatically refreshes unlike manual copy-paste, and uses familiar Excel formulas.
Use Power Query if: You need one-time historical data imports, work in a restricted environment that blocks add-ins, or want to combine oil prices with other data sources.
Use manual copy-paste if: You only check prices once a week for general awareness and don't need automation.
Real-World Use Cases: How Traders & Analysts Use This
Theory is great, but let's look at how real energy professionals use Excel oil price formulas in their daily workflows. These examples come from actual customers.
1. Energy Trader: Monitoring WTI-Brent Spread for Arbitrage
The Challenge: A commodity trader needs to react quickly when the Brent-WTI spread exceeds $4/barrel—a signal for potential arbitrage opportunities.
The Setup: Build a simple dashboard with auto-updating prices and trading signals.
=OILPRICE.LATEST("BRENT_CRUDE_USD")=OILPRICE.LATEST("WTI_USD")=A1-A2=IF(A3>4,"TRADE","HOLD")The Benefit: With prices updating every 5 minutes, the trader reacts 2-5 minutes faster to spread movements—critical in volatile markets. Add conditional formatting to highlight "TRADE" signals in red, and you have a real-time alert system.
"I used to check the spread manually every hour. Now it's always on my second monitor, updating automatically. I've caught two profitable trades this month I would have missed before." — Commodity Trader, Houston
2. Financial Analyst: Oil Company DCF Valuation Model
The Challenge: Building a discounted cash flow (DCF) model for an oil & gas company requires accurate oil price assumptions. Models become stale quickly when using static prices.
The Setup: Link the revenue assumptions tab to live Brent crude prices. When Brent moves from $80 to $85, the entire valuation updates automatically.
Cell B5 (Current Brent):=OILPRICE.LATEST("BRENT_CRUDE_USD")Cell B6 (Year 1 Forecast):=B5 * 1.05 // 5% growth assumptionCell B10 (Annual Revenue):=B6 * ProductionVolume * 365The Benefit: Your DCF model always reflects current market conditions. No more embarrassing presentations with last week's oil price. Stakeholders see valuations based on today's market reality.
"Our investment committee meets every Monday morning. Before, I'd scramble to update oil prices in the valuation models. Now they're always current. Saved me 30 minutes every week." — Equity Research Analyst, New York
3. Procurement Manager: Timing Bulk Diesel Purchases
The Challenge: A logistics company burns 50,000 gallons of diesel monthly. Buying when prices are 5% below the 30-day average saves $7,500 per month.
The Setup: Track current diesel prices against a 30-day moving average and generate buy signals.
Cell C1 (Current Diesel Price):=OILPRICE.LATEST("DIESEL_USD")Cell C2 (30-Day Average):=AVERAGE(OILPRICE.HISTORY("DIESEL_USD", TODAY()-30, TODAY()))Cell C3 (Buy Signal):=IF(C1 < C2*0.95, "BUY NOW", "WAIT")Cell C4 (Potential Savings):=(C2-C1) * 50000 // 50k gallons/monthThe Benefit: Data-driven procurement timing. Instead of buying on a fixed schedule (first of the month), the manager buys when prices dip below trend. Over a year, this can save tens of thousands of dollars.
"We used to buy diesel on the first Monday of every month, regardless of price. Now we watch the 30-day average and buy strategically. Saved our company $42,000 last year." — Fleet Manager, Chicago
4. Academic Researcher: Historical Price Correlation Study
The Challenge: A PhD student studying energy markets needs 10 years of daily WTI, Brent, and Natural Gas prices to analyze correlations. Bloomberg Terminal costs $24,000/year—far beyond a graduate student's budget.
The Setup: Use historical data formulas to pull a decade of prices and calculate rolling correlations.
Column A (WTI Prices 2014-2024):=OILPRICE.HISTORY("WTI_USD", "2014-01-01", "2024-12-31")Column B (Brent Prices):=OILPRICE.HISTORY("BRENT_CRUDE_USD", "2014-01-01", "2024-12-31")Column C (Natural Gas):=OILPRICE.HISTORY("NATURAL_GAS_USD", "2014-01-01", "2024-12-31")Column D (WTI-Brent Correlation):=CORREL(A2:A365, B2:B365) // Rolling 1-year correlationThe Benefit: Academic-quality data without expensive Bloomberg subscriptions. Export to CSV, analyze in Python or R, and publish research papers with credible data sources.
"I needed 10 years of daily crude oil prices for my dissertation. Bloomberg was $24k/year. The Oil Price API historical data plan was $45/month. Easy decision." — PhD Candidate, MIT Energy Initiative
Pricing & Request Limits
The Excel add-in is free to install. You need an API key to fetch prices, and we offer a generous free tier plus affordable paid plans for heavy users.
Free Tier
- ✓ 100 lifetime API requests - no expiration
- ✓ Real-time current prices - updates every 5 minutes
- ✓ 100+ commodities - WTI, Brent, natural gas, and more
- ✓ Auto-refresh enabled - set-it-and-forget-it
- ✓ No credit card required - start using in 2 minutes
What 100 Requests Means
Each time a formula fetches a price, it counts as one request. Here's how long 100 requests lasts:
- Checking 5 prices daily: 500 ÷ 5 = 100 days (3+ months)
- Weekend trader checking 10 prices: 500 ÷ 10 = 50 days
- Personal project tracking 3 prices: 500 ÷ 3 = 166 days (5+ months)
The free tier is perfect for testing the add-in, personal projects, and light professional use.
Paid Plans
Exploration
- ✓ 10,000 requests/month
- ✓ Real-time prices
- ✓ All commodities
- ✓ Email support
Production
- ✓ 50,000 requests/month
- ✓ Real-time prices
- ✓ All commodities
- ✓ Priority support
Reservoir Mastery
- ✓ 250,000 requests/month
- ✓ Historical data access
- ✓ All commodities
- ✓ Premium support
Enterprise Plans
Need more than 250,000 requests/month? We offer custom enterprise plans with:
- ✓ Unlimited API requests
- ✓ White-label options
- ✓ Dedicated support engineer
- ✓ Custom SLAs and uptime guarantees
- ✓ On-premise deployment options
Contact us for enterprise pricing.
Troubleshooting Common Issues
Most issues with the Excel add-in are quick to fix. Here are the five most common problems and their solutions:
Issue 1: Formula Returns #NAME! Error
Symptom: When you type =OILPRICE.LATEST("WTI_USD"), Excel shows #NAME!
Cause: The add-in isn't loaded, or there's a typo in the formula.
Solution:
- Check if "Energy Price Comparison" appears in the Excel ribbon under Insert → My Add-ins
- If not, reinstall the add-in from oilpriceapi.com/excel
- Verify formula spelling:
=OILPRICE.LATEST(not=OilPrice.Latest(
Issue 2: Formula Shows "Loading..." Forever
Symptom: Formula displays "Loading..." but never shows a price.
Cause: API key not configured or invalid.
Solution:
- Open the add-in sidebar (should appear on the right side of Excel)
- Click "Test Connection" button
- If it fails, re-enter your API key from the dashboard
- Check your internet connection
- Try manually refreshing: Click "Refresh Prices" in sidebar
Issue 3: Prices Not Updating Automatically
Symptom: Prices are stuck at old values and don't refresh.
Cause: Auto-refresh is disabled.
Solution:
- Open the add-in sidebar
- Look for "Auto-refresh every 5 minutes" toggle
- Enable the toggle if it's off
- Alternatively, click "Refresh Now" to manually update prices
Issue 4: "Request Limit Exceeded" Error
Symptom: Formula returns an error: "API request limit exceeded"
Cause: You've used all 100 free requests.
Solution:
- Check usage in sidebar: Shows "100 / 100 requests used"
- Upgrade to a paid plan: View pricing
- Or reduce refresh frequency to conserve remaining requests
- Disable auto-refresh and refresh manually only when needed
Issue 5: Historical Data Formula Not Working
Symptom: =OILPRICE.HISTORY(...) returns an error.
Cause: Historical data requires a paid plan.
Solution:
- Upgrade to Exploration tier ($15/month) or higher for historical data access
- Free tier only supports current prices via
=OILPRICE.LATEST()
Still Stuck?
If these solutions don't fix your issue, we're here to help:
- 📚 Check our Excel Support Guide for more detailed troubleshooting
- 💬 Contact our support team - we respond within 24 hours
- 📧 Email us directly at [email protected]
Frequently Asked Questions
Q: Is the Excel add-in really free?
A: Yes! The add-in itself is 100% free to install. You need an API key to fetch prices, and we include 100 lifetime API requests free with every account. No credit card required to start.
Q: Do I need to know programming or VBA?
A: Not at all. If you know how to use =SUM() or =AVERAGE(), you can use =OILPRICE.LATEST(). It works just like native Excel functions—no code required.
Q: Which Excel versions are supported?
A: The add-in works with Excel 2016 and newer on Windows, Excel 2016 and newer on Mac, and Excel Online (Office 365). It does not support Excel 2013 or older versions.
Q: How accurate are the oil prices?
A: Prices come from official exchanges (NYMEX, ICE) and major trading platforms. Data is accurate to within 1-2 minutes during trading hours. We use the same data sources as Bloomberg and Reuters terminals.
Q: Can I share my Excel workbook with colleagues?
A: Yes! You can share workbooks containing oil price formulas. Anyone who opens the file will need to install the add-in and use their own API key. The formulas work the same way for everyone.
Q: What commodities are available besides oil?
A: Over 100 commodities including WTI, Brent, Natural Gas, RBOB Gasoline, Diesel, Heating Oil, Propane, Coal, Gold, Silver, Copper, and more. View the full list.
Q: How often do prices update?
A: Prices update automatically every 5 minutes during trading hours (approximately 6:00 AM to 5:00 PM ET, Monday-Friday). You can also click "Refresh Prices" in the sidebar to update manually anytime.
Q: Is my API key secure?
A: Yes. API keys are stored locally on your computer within Excel only. We use bank-level encryption (TLS 1.3) for all API calls. Your key is never shared with third parties or stored in the cloud.
Q: Can I get historical oil price data?
A: Yes, but historical data requires a paid plan (Exploration tier or higher). Use the =OILPRICE.HISTORY() formula to pull daily prices for any date range.
Q: What happens if I exceed my request limit?
A: Formulas will return an error message: "API request limit exceeded." You can upgrade to a paid plan for more requests, or disable auto-refresh and manually refresh only when needed to conserve requests.
Ready to Stop Copy-Pasting Oil Prices?
Getting real-time oil prices in Excel used to be a daily chore. You'd spend 15-30 minutes copying prices from websites, pasting them into cells, and hoping you didn't make a mistake. That workflow is outdated.
With the right tools, it's now a 2-minute setup that runs on autopilot. Whether you choose Power Query for technical control or the Excel add-in for simplicity, automated oil prices save time, reduce errors, and keep your models current.
Quick Recap: Three Methods
Get Started in 3 Steps (2 Minutes)
- 1. Install the add-in → oilpriceapi.com/excel
- 2. Get your free API key → 100 API requests included, no credit card required
- 3. Start using formulas →
=OILPRICE.LATEST("BRENT_CRUDE_USD")