Inspiration
Less Than 1 Second | Zero Software Cost
I have spent more than 15 years working in refinery engineering, piping, project planning and execution, procurement support, and cost estimation. During this time, I repeatedly faced the same problem: reliable piping prices are often unavailable when an estimate is urgently required.
A refinery contains an enormous variety of piping materials and components. In our refinery, pipe sizes range from approximately 0.5 inch to 48 inches, with wall thicknesses ranging from around 3 mm to 35 mm.
The piping system also includes:
- Elbows
- Tees
- Reducers
- Flanges
- Valves
- Gaskets
- Bolts
- Strainers
- Pipe supports
- Other specialty components
These items are manufactured using different material categories, including:
- Carbon steel
- Low-temperature carbon steel
- Alloy steel
- Stainless steel
- Other special materials
Every combination of pipe size, wall thickness, schedule, material grade, pressure rating, component type, manufacturing method, testing requirement, and coating condition can have a different price.
Why Cost Estimation Software?
Refinery and petrochemical projects are too complex to depend entirely on manual estimating. A single project may contain tens of thousands of cost drivers across piping, equipment, civil, structural, electrical, instrumentation, insulation, painting, construction services, and indirect costs.
Manual estimation also creates inconsistency across units and projects. Different engineers and estimators may use different:
- Assumptions
- Rate sources
- Calculation methods
- Conversion factors
- Escalation factors
- Contingencies
- Exclusions
- Risk allowances
As a result, two estimators may produce different costs for the same scope.
Cost estimation software enables three critical outcomes:
Speed + Consistency + Auditability
A structured estimation platform provides:
- Faster preparation and revision of estimates
- Consistent calculation logic across projects
- Transparent assumptions and calculation trails
- Validated and reusable cost libraries
- Faster updates when project scope changes
- Easier review of quantities, rates, factors, and exclusions
- Better comparison between internal estimates and vendor quotations
- Stronger cost governance for management, finance, audit, vigilance, and approval
The objective is not merely to automate arithmetic. It is to convert fragmented engineering knowledge, historical prices, rate libraries, and estimation assumptions into a repeatable decision-support system.
Market Research and the Build-versus-Buy Decision
As part of the initial market research, I reviewed established commercial cost-estimation platforms, including Cleopatra Enterprise and Aspen Capital Cost Estimator.
Based on the indicative commercial information available during our assessment, the approximate annual licensing costs were:
- Cleopatra Enterprise: approximately ₹70 lakh per year (up to maximum 5 users), with a relatively limited customer base in India.
- Aspen Capital Cost Estimator: approximately ₹4 crore per year (up to maximum 5 users) with established credentials that could meet the likely qualification requirements if a tender is floated for procurement of cost-estimation software.
In addition to the license cost, these platforms would need to be configured and calibrated using the organization's historical purchase orders, rate data, estimation practices, and project experience.
This led to a fundamental build-versus-buy question:
Instead of transferring extensive historical cost data to an external party and paying a substantial recurring license fee, could we build a focused estimation platform using our own domain knowledge and Codex?
The objective was not to reproduce every capability of an enterprise capital-cost platform. The objective was to solve a specific, high-frequency problem: preparing fast, transparent, and auditable estimates for piping materials and services.
By combining internal engineering knowledge with Codex-assisted software development, I was able to create a browser-based application that:
- Retains control over the estimation logic and cost libraries
- Can be continuously improved as new purchase-order data becomes available
- Avoids recurring software license costs
- Reduces dependence on external configuration support
- Protects sensitive historical pricing information
- Provides a solution tailored specifically to piping estimation
- Can be publicly deployed at zero software and hosting cost
This project demonstrates that Codex can make the build option economically and technically feasible for focused industrial applications that previously required specialist software-development resources.
The Five-Year Purchase-Order Limitation
For technical cost estimation, we generally rely on recent purchase-order prices. However, historical purchase-order prices are normally acceptable only when they are sufficiently recent, typically within the previous five years.
It is practically impossible for a refinery to have purchased every possible combination of pipe, fitting, flange, valve, size, schedule, rating, and material grade during those five years.
When a suitable recent purchase-order price is unavailable, engineers normally approach vendors for budgetary quotations.
Obtaining a budgetary quotation may take 10 to 15 days. Even after receiving it, there is no certainty that the same vendor will quote a similar price during competitive tendering.
This creates several problems:
- Project estimates are delayed
- Management approvals are delayed
- Tender preparation is delayed
- Engineers become dependent on vendors for preliminary decisions
- Vendors may not respond to small or early-stage requirements
- Contractors and consultants face the same pricing uncertainty
- Remote locations may have limited access to suppliers and market information
- The estimate basis may be difficult to defend during technical, financial, audit, vigilance, or governance review
This is not a problem faced by only one refinery. Similar challenges exist across refineries, petrochemical plants, EPC organizations, consultants, contractors, and process industries globally.
Why the Problem Matters
Piping is a major cost package in refinery and petrochemical projects. Depending on the nature and scope of the project, piping materials and associated services can represent a substantial portion of the total project investment.
The requirement for piping cost estimates also continues throughout the operating life of a refinery. Modifications are regularly required because of:
- Hazard and operability studies
- Management of Change requests
- Safety recommendations
- Environmental compliance
- Reliability improvements
- Capacity enhancement
- Energy-efficiency projects
- Maintenance and turnaround work
- Replacement of aging piping and equipment
- Business-development initiatives
Each modification may require pipes, fittings, flanges, valves, supports, painting, insulation, welding, erection, civil works, and post-weld heat treatment.
Therefore, piping cost estimation is not a one-time activity. It is a recurring requirement throughout the life of a refinery.
The Idea Behind the Project
Instead of waiting for a separate vendor quotation for every piping item, I wanted to create an independent estimation framework based on engineering and commercial fundamentals.
The application converts raw-material price benchmarks into indicative finished-component prices using:
- Component weight
- Pipe geometry
- Nominal size
- Wall thickness or schedule
- Material category
- Material specification
- Component type
- Pressure rating
- Manufacturing and conversion factors
- Installation conditions
- Applicable service rates
The objective is not to predict the final tender price to the last rupee. Final prices will still depend on market conditions, order quantity, delivery period, vendor capacity, location, testing requirements, commercial terms, and competition.
The objective is to provide a fast, transparent, and technically defensible independent cost benchmark before approaching the market.
My broader vision is:
Piping Cost 360: Any size. Multiple materials. Material and service cost. One transparent estimation platform.
A refinery engineer should not have to wait 10 to 15 days to begin understanding the likely cost of a piping requirement.
A contractor should not have to prepare a tender without a reasonable cost reference.
A project owner should not depend entirely on the same vendor whose quotation is being evaluated.
This project aims to provide that independent starting point in:
Less Than 1 Second | Zero Software Cost
What it does
Piping Material & Service Cost Estimator is a browser-based engineering decision-support application that converts manual inputs or piping Bills of Materials into preliminary (AACE Class 3) material and service cost estimates.
The application provides two separate but connected cost views.
Part A: Piping Material Cost
The material-cost engine can:
- Accept manual piping inputs
- Import Excel, XLS, and CSV BOM files
- Recognize pipes, fittings, flanges, valves, bolts, gaskets, strainers, and other components
- Detect different BOM column names and layouts
- Convert nominal pipe size and schedule into actual dimensions
- Calculate pipe weight using outside diameter, wall thickness, density, and length
- Estimate the weight of fittings, flanges, valves, and other components
- Classify materials into carbon steel, alloy steel, stainless steel, and review categories
- Convert raw-material prices per kilogram into indicative finished-component prices
- Apply material-specific and component-specific estimation factors
- Calculate normal and P90 budget estimates
- Group costs by material and component category
- Generate printable and exportable calculation reports
The application does not depend on a fixed price list for every individual piping item. Instead, it uses engineering geometry, component weight, material category, and conversion factors to develop an indicative finished price.
Part B: Piping Service Cost
The service-cost engine estimates preliminary costs for:
- Pipe erection
- Fitting welding
- Flange welding
- Valve installation
- Rework and modification
- Structural pipe supports
- Civil works for pipe supports
- Pipe painting
- Pipe insulation
- Post-weld heat treatment where applicable
The service cost is not calculated by applying one hidden percentage to the material cost.
Each service uses an engineering quantity basis, such as:
- Pipe erection based on inch-meter quantity
- Welding based on estimated inch-diameter quantity
- Valve installation based on component weight
- Pipe supports based on estimated structural-steel quantity
- Civil works based on the number and size of supports
- Painting based on external surface area
- Insulation based on surface area and temperature
- PWHT based on material, thickness, piping class, and eligible welding quantity
The application provides an independent benchmark that helps users:
- Prepare preliminary project estimates (AACE Class 3)
- Review vendor budgetary quotations
- Challenge unusually high prices
- Compare material and design alternatives
- Identify major cost drivers
- Improve tender estimates
- Support commercial negotiations
- Maintain a transparent calculation trail
- Reduce dependence on individual vendors
It is intended for refinery owners, petrochemical companies, consultants, EPC contractors, construction contractors, procurement teams, freelance estimators, students, and engineers.
How I built it
I am a mechanical engineer and refinery professional, not a traditional software developer.
I provided the domain knowledge, engineering formulas, material classifications, estimation factors, service-rate logic, validation requirements, user workflow, and expected reports.
I used OpenAI Codex as my software engineering partner to convert that practical knowledge into a working web application.
The project was developed using:
- HTML
- CSS
- JavaScript
- JSON-based engineering and rate libraries
- Browser-based Excel and CSV processing
- GitHub for version control
- GitHub Pages for public deployment
Codex helped me:
- Convert piping calculations into reusable JavaScript functions.
- Develop pipe-size and schedule lookup logic.
- Build material-price and service-rate libraries.
- Create Excel and CSV BOM parsing.
- Detect actual table headers even when title rows appear above the BOM.
- Normalize inconsistent component names and engineering abbreviations.
- Classify BOM items into pipe, fitting, flange, valve, bolt, gasket, strainer, and other groups.
- Calculate item weights and indicative costs.
- Build separate material and service estimation engines.
- Add validation rules, warnings, fallback conditions, and review flags.
- Debug calculation and interface issues.
- Improve charts, summaries, reports, printing, and exports.
- Refactor the code without disturbing established engineering logic.
- Test the application across different sizes, materials, schedules, and component descriptions.
The development process combined two capabilities:
- My refinery, piping, procurement, and cost-estimation experience
- Codex's ability to translate structured requirements into software
I acted as the domain expert, product owner, estimator, tester, and end user. Codex acted as the coding, debugging, and implementation partner.
Without Codex, converting more than 15 years of practical engineering experience into a functioning public web application within this timeframe would not have been practical.
Challenges I ran into
Handling the enormous variety of piping materials
The application needed to support pipe sizes from approximately 0.5 inch to 48 inches, wall thicknesses from around 3 mm to 35 mm, multiple material categories, different schedules, pressure ratings, and component types.
A fixed item-by-item price list would never cover every possible combination. We therefore developed a weight-based and factor-based estimation framework.
Interpreting real-world BOM descriptions
Engineering BOMs are rarely standardized.
A weld-neck flange may be written as:
W.N. FlangeWN FlangeFLANG WNWeld Neck FlangeWN Flng
Similar variations exist for elbows, tees, reducers, valves, materials, schedules, ratings, and units.
We had to create normalization and alias-handling logic before applying any calculation.
Converting raw-material price into finished-component price
Raw steel price is not the final price of a pipe, fitting, flange, or valve.
The finished price also includes manufacturing, forming, forging, machining, testing, inspection, coating, wastage, overhead, commercial risk, and supplier margin.
The challenge was to create a transparent conversion framework without claiming that the result was an exact vendor quotation.
Avoiding false precision
The final tender price can be affected by quantity, delivery period, vendor workload, market demand, commercial terms, testing requirements, location, competition, and project urgency.
The application is therefore designed as an independent budget benchmark, not a guaranteed tender-price predictor.
Where a reliable calculation basis is unavailable, the application displays Review or excludes the unsupported item instead of silently producing an unjustified value.
Maintaining calculation transparency
The easiest approach would have been to apply a fixed percentage to the total material cost.
I deliberately avoided that approach.
Each material and service category is calculated using a visible engineering basis so users can understand, review, challenge, and improve the result.
Protecting project data
Piping BOMs may contain sensitive project information.
The application processes uploaded files directly inside the user's browser. It does not require a server upload or database storage. This keeps the application simple, privacy-conscious, and deployable at zero hosting cost through GitHub Pages.
Accomplishments that I am proud of
I am proud that the application:
- Converts a multi-item piping BOM into an initial estimate almost instantly
- Covers both material supply and piping service costs
- Supports small-bore to large-diameter refinery piping
- Handles multiple major material categories
- Converts raw-material prices into indicative finished-component costs
- Provides normal and P90 budget estimates
- Uses transparent formulas rather than black-box calculations
- Processes Excel and CSV files directly in the browser
- Requires no paid software license
- Requires no paid server or database
- Keeps uploaded BOM data on the user's device
- Produces printable and exportable calculation records
- Supports vendor-quotation review and commercial negotiation
- Helps consultants and contractors prepare more informed estimates
- Makes practical piping cost knowledge available to a wider engineering community
The project also demonstrates that an experienced industry professional can use Codex to become a software builder.
It converts individual engineering knowledge into a repeatable, scalable, and publicly accessible decision-support system.
Most importantly, it changes the starting question from:
Which vendor can provide a budgetary quotation?
to:
What should this item reasonably cost based on its engineering and commercial fundamentals?
What I learned
The most important lesson was that AI does not replace domain expertise. It amplifies well-structured domain expertise.
Codex could generate, debug, and improve software rapidly, but the quality of the application depended on clearly defining:
- Engineering formulas
- Calculation boundaries
- Assumptions
- Exclusions
- Validation rules
- Failure conditions
- Review requirements
- User decisions
- Commercial limitations
I also learned that building an engineering application is not primarily a coding challenge.
The more difficult challenge is converting professional experience and judgment into explicit formulas, conditions, classifications, exceptions, and warnings.
A good engineering estimator should not only produce a number. It should also explain:
- Where the number came from
- What assumptions were used
- Which items were included
- Which items were excluded
- Which rates and factors were applied
- Which items require further review
- How the result may change when assumptions change
I learned that software can make engineering judgment scalable, but only when the underlying logic remains transparent.
What's next for Piping Material & Service Cost Estimator
The next phase is to evolve the application from a piping cost calculator into a comprehensive, AI-enabled project cost-estimation and knowledge-management platform.
1. Support all AACE estimate classes
Expand the methodology to support the full range of AACE estimate classifications, from Class 5 conceptual estimates to Class 1 definitive estimates, with appropriate levels of scope definition, accuracy, contingency, documentation, and review.
2. Introduce an AI-powered natural-language interface
Enable users to create, modify, and query estimate line items using simple instructions, such as:
“Add 15 m² of insulation to Section B” or “Show the impact of increasing stainless-steel prices by 10%.”
3. Automate quantity extraction from drawings and documents
Develop capabilities to extract quantities and BOM data from engineering drawings, PDFs, datasheets, and scanned documents using OCR and structured-data parsing, while allowing users to review, correct, and approve the extracted information.
4. Reduce the estimation cycle time by 50%
Target a minimum 50% reduction in the median time required to move an estimate from initial draft to final review and approval through automation, standardized workflows, reusable libraries, and faster revisions.
5. Expand beyond piping to all major project disciplines
Extend the platform to provide an integrated estimate covering up to 100% of a project or modification scope, including:
- Civil and structural works
- Mechanical works
- Electrical works
- Instrumentation and control works
- Process and utility systems
- Safety and firefighting systems
- Project-management and indirect costs
6. Build stronger in-house estimation capability
Reduce dependence on external consultants by using Codex to convert internal engineering knowledge, historical cost data, calculation methods, and estimation practices into maintainable in-house software.
7. Accelerate learning for new joiners
Use the platform as a structured learning system that explains formulas, assumptions, cost drivers, exclusions, and review requirements, helping new engineers and estimators become productive faster.
8. Capture and preserve domain expertise
Convert the tacit knowledge of experienced engineers, estimators, procurement professionals, and project managers into reusable rules, validated libraries, decision logic, and institutional knowledge that remains available even when individuals change roles or retire.
Built With
- app
- browser-based
- client-side
- codex
- css3
- csv
- design
- excel
- github
- html5
- javascript
- json
- openai
- pages
- processing
- responsive
- static
- style
- vanilla
- web
- xlsx.js
Log in or sign up for Devpost to join the conversation.