Benchmark illustrates models’ capabilities like coding and reasoning. ’s result reflects he model’s performance over various domains available on data on agentic coding, math, reasoning, and tool use.
| Benchmark | Claude 4 Opus | Claude 4 Sonnet | GPT-4o | Gemini 2.5 Pro |
| HumanEval (Code Gen) | Not Available | Not Available | 74.8% | 75.6% |
| GPQA (Graduate Reasoning) | 83.3% | 83.8% | 83.3% | 83.0% |
| MMLU (World Knowledge) | 88.8% | 86.5% | 88.7% | 88.6% |
| AIME 2025 (Math) | 90.0% | 85.0% | 88.9% | 83.0% |
| SWE-bench (Agentic Coding) | 72.5% | 72.7% | 69.1% | 63.2% |
| TAU-bench (Tool Use) | 81.4% | 80.5% | 70.4% | Not Available |
| Terminal-bench (Coding) | 43.2% | 35.5% | 30.2% | 25.3% |
| MMMU (Visual Reasoning) | 76.5% | 74.4% | 82.9% | 79.6% |
In this, Claude 4 generally excels in coding, GPT-4o in reasoning, and Gemini 2.5 Pro offers strong, balanced performance across different modalities. For more information, please visit here.
Overall Analysis
Here’s what we’ve learned about these advanced closing models, based on the above points of comparison:
- We found that Claude 4 excels in coding, math, and tool use, but it is also the most expensive one.
- GPT-4o excels at reasoning and multimodal support, handling different input formats, making it an ideal choice for more advanced and complex assistants.
- Meanwhile, Gemini 2.5 Pro offers a strong and balanced performance with the largest context window and the most cost-effective pricing.
Claude 4 vs GPT-4o vs Gemini 2.5 Pro: Coding Capabilities
Now we will compare the code-writing capabilities of Claude 4, GPT-4o, and Gemini 2.5 Pro. For that, we are going to give the same prompt to all three models and evaluate their responses on the following metrics:
- Efficiency
- Readability
- Comment and Documentation
- Error Handling
Task 1: Design Playing Cards with HTML, CSS, and JS
Prompt: “Create an interactive webpage that displays a collection of WWE Superstar flashcards using HTML, CSS, and JavaScript. Each card should represent a WWE wrestler, and must include a front and back side. On the front, display the wrestler’s name and image. On the back, show additional stats such as their finishing move, brand, and championship titles. The flashcards should have a flip animation when hovered over or clicked.
Additionally, add interactive controls to make the page dynamic: a button that shuffles the cards, and another that shows a random card from the deck. The layout should be visually appealing and responsive for different screen sizes. Bonus points if you include sound effects like entrance music when a card is flipped.
Key Features to Implement:
- Front of card: wrestler’s name + image
- Back of card: stats (e.g., finisher, brand, titles)
- Flip animation using CSS or JS
- “Shuffle” button to randomly reorder cards
- “Show Random Superstar” button
- Responsive design.”
Claude 4’s Response:
GPT-4o’s Response:
Gemini 2.5 Pro’s Response:
Comparative Analysis
In the first task, Claude 4 gave the most interactive experience with the most dynamic visuals. It also added a sound effect while clicking on the card. GPT-4o gave a black theme layout with smooth transitions and fully functional buttons, but lacked the audio functionality. Meanwhile, Gemini 2.5 Pro gave the simplest and most basic sequential layout with no animation or sound. Also, the random card feature in this one failed to show the card’s face properly. Overall, Claude takes the lead here, followed by GPT-4o, and then Gemini.
Task 2: Build a Game
Prompt: “Spell Strategy Game is a turn-based battle game built with Pygame, where two mages compete by casting spells from their spellbooks. Each player starts with 100 HP and 100 Mana and takes turns selecting spells that deal damage, heal, or apply special effects like shields and stuns. Spells consume mana and have cooldown periods, requiring players to manage resources and strategize carefully. The game features an engaging UI with health and mana bars, and spell cooldown indicators.. Players can face off against another human or an AI opponent, aiming to reduce their rival’s HP to zero through tactical decisions.
Key Features:
- Turn-based gameplay with two mages (PvP or PvAI)
- 100 HP and 100 Mana per player
- Spellbook with diverse spells: damage, healing, shields, stuns, mana recharge
- Mana costs and cooldowns for each spell to encourage strategic play
- Visual UI elements: health/mana bars, cooldown indicators, spell icons
- AI opponent with simple tactical decision-making
- Mouse-driven controls with optional keyboard shortcuts
- Clear in-game messaging showing actions and effects”
Claude 4’s Response:
GPT-4o’s Response:
Gemini 2.5 Pro’s Response:
Comparative Analysis
In the second task, on the whole, none of the models provided proper graphics. Each one displayed a black screen with a minimal interface. However, Claude 4 offered the most functional and smooth control over the game, with a wide range of attack, defence, and other strategic gameplay. GPT-4o, on the other hand, suffered from performance issues, such as lagging, and a small and concise window size. Even Gemini 2.5 Pro fell short here, as its code failed to run and gave some errors. Overall, once again, Claude takes the lead here, followed by GPT-4o, and then Gemini 2.5 Pro.
Task 3: Best Time to Buy and Sell Stock
Prompt: “You are given an array prices where prices[i] is the price of a given stock on the ith day.
Find the maximum profit you can achieve. You may complete at most two transactions.
Note: You may not engage in multiple transactions simultaneously (i.e., you must sell the stock before you buy again).
Example:
Input: prices = [3,3,5,0,0,3,1,4]
Output: 6
Explanation: Buy on day 4 (price = 0) and sell on day 6 (price = 3), profit = 3-0 = 3. Then buy on day 7 (price = 1) and sell on day 8 (price = 4), profit = 4-1 = 3.”
Claude 4’s Response:

GPT-4o’s Response:

Gemini 2.5 Pro’s Response:

Comparative Analysis
In the third and final task, the models had to solve the problem using dynamic programming. Among the three, GPT-4o offered the most practical and well-approached solution, using a clean 2D dynamic programming with safe initialization, and also included test cases. While Claude 4 provided a more detailed and educational approach, it is more verbose. Meanwhile, Gemini 2.5 Pro gave a concise method, but used INT_MIN initialization, which is a risky approach. So in this task, GPT-4o takes the lead, followed by Claude 4, and then Gemini 2.5 Pro.
Final Verdict: Overall Analysis
Here’s a comparative summary of how well each model has performed in the above tasks.
| Task | Claude 4 | GPT-4o | Gemini 2.5 Pro | Winner |
| Task 1 (Card UI) | Most interactive with animations and sound effects | Smooth dark theme with functional buttons, no audio | Basic sequential layout, card face issue, no animation/sound | Claude 4 |
| Task 2 (Game Control) | Smooth controls, broad strategy options, most functional game | Usable but laggy, small window | Failed to run, interface errors | Claude 4 |
| Task 3 (Dynamic Programming) | Verbose but educational, good for learning | Clean and safe DP solution with test cases, most practical | Concise but unsafe (uses INT_MIN), lacks robustness | GPT-4o |
To check the complete version of all the code files, please visit here.
Conclusion
Now, through this comprehensive comparison of three diverse tasks, we have observed that Claude 4 stands out with its interactive UI design capabilities and stable logic in modular programming, making it the top performer overall. While GPT-4o follows closely with its clean and practical coding, and excels in algorithmic problem solving. Meanwhile, Gemini 2.5 Pro lacks in UI design and stability in execution across all tasks. But these observations are completely based on the above comparison, while each model has unique strengths, and the choice of model completely depends on the problem we are trying to solve.
Hello! I’m Vipin, a passionate data science and machine learning enthusiast with a strong foundation in data analysis, machine learning algorithms, and programming. I have hands-on experience in building models, managing messy data, and solving real-world problems. My goal is to apply data-driven insights to create practical solutions that drive results. I’m eager to contribute my skills in a collaborative environment while continuing to learn and grow in the fields of Data Science, Machine Learning, and NLP.
Login to continue reading and enjoy expert-curated content.