{"id":2271,"date":"2025-02-07T15:01:27","date_gmt":"2025-02-07T15:01:27","guid":{"rendered":"https:\/\/donhit.com\/en\/?p=2271"},"modified":"2025-02-07T15:02:32","modified_gmt":"2025-02-07T15:02:32","slug":"pipe-volume","status":"publish","type":"post","link":"https:\/\/donhit.com\/en\/calculator\/pipe-volume\/","title":{"rendered":"Pipe Volume Calculator"},"content":{"rendered":"<p><center><div class=\"bg-white shadow-2xl rounded-2xl p-8 w-full max-w-md\">\r\n        <h2 class=\"text-3xl font-bold text-center mb-6 text-gray-800\">Pipe Volume Calculator<\/h2>\r\n        \r\n        <div class=\"space-y-4\">\r\n            <div class=\"input-group\">\r\n                <label class=\"block text-sm font-medium text-gray-700 mb-2\">Pipe Length (m)<\/label>\r\n                <input type=\"number\" id=\"pipeLength\" class=\"w-full p-3 border rounded-lg focus:outline-none\" placeholder=\"Enter pipe length\">\r\n            <\/div>\r\n            \r\n            <div class=\"input-group\">\r\n                <label class=\"block text-sm font-medium text-gray-700 mb-2\">Pipe Diameter (mm)<\/label>\r\n                <input type=\"number\" id=\"pipeDiameter\" class=\"w-full p-3 border rounded-lg focus:outline-none\" placeholder=\"Enter pipe diameter\">\r\n            <\/div>\r\n            \r\n            <div class=\"input-group\">\r\n                <label class=\"block text-sm font-medium text-gray-700 mb-2\">Volume Unit<\/label>\r\n                <select id=\"volumeUnit\" class=\"w-full p-3 border rounded-lg focus:outline-none\">\r\n                    <option value=\"liters\">Liters<\/option>\r\n                    <option value=\"cubicMeters\">Cubic Meters<\/option>\r\n                    <option value=\"gallons\">US Gallons<\/option>\r\n                <\/select>\r\n            <\/div>\r\n            \r\n            <button onclick=\"calculateVolume()\" class=\"w-full bg-green-500 text-white p-3 rounded-lg hover:bg-green-600 transition duration-300\">\r\n                Calculate Volume\r\n            <\/button>\r\n        <\/div>\r\n        \r\n        <div id=\"resultBox\" class=\"mt-6 p-4 bg-blue-50 rounded-lg text-center hidden\">\r\n            <h2 class=\"text-xl font-semibold text-blue-800\">Result<\/h2>\r\n            <p id=\"volumeResult\" class=\"text-2xl font-bold text-blue-600 mt-2\"><\/p>\r\n        <\/div>\r\n    <\/div>\r\n\r\n    <script>\r\n        function calculateVolume() {\r\n            const length = parseFloat(document.getElementById('pipeLength').value);\r\n            const diameter = parseFloat(document.getElementById('pipeDiameter').value);\r\n            const volumeUnit = document.getElementById('volumeUnit').value;\r\n            const resultBox = document.getElementById('resultBox');\r\n            const volumeResultElement = document.getElementById('volumeResult');\r\n\r\n            if (isNaN(length) || isNaN(diameter) || length <= 0 || diameter <= 0) {\r\n                alert('Please enter valid positive numbers for length and diameter.');\r\n                return;\r\n            }\r\n\r\n            \/\/ Calculate volume (\u03c0 * r\u00b2 * length)\r\n            const radius = diameter \/ 2000; \/\/ Convert mm to meters\r\n            const volume = Math.PI * Math.pow(radius, 2) * length;\r\n\r\n            let displayVolume, displayUnit;\r\n            switch(volumeUnit) {\r\n                case 'liters':\r\n                    displayVolume = (volume * 1000).toFixed(2);\r\n                    displayUnit = 'Liters';\r\n                    break;\r\n                case 'cubicMeters':\r\n                    displayVolume = volume.toFixed(4);\r\n                    displayUnit = 'm\u00b3';\r\n                    break;\r\n                case 'gallons':\r\n                    displayVolume = (volume * 264.172).toFixed(2);\r\n                    displayUnit = 'US Gallons';\r\n                    break;\r\n            }\r\n\r\n            volumeResultElement.textContent = `${displayVolume} ${displayUnit}`;\r\n            resultBox.classList.remove('hidden');\r\n        }\r\n    <\/script><\/center><br \/>\nPipe Volume Calculator \u2013 Quickly determine the volume of a pipe in liters, cubic meters, or gallons using inner diameter and length for accurate results.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Pipe Volume Calculator \u2013 Quickly determine the volume of a pipe in liters, cubic meters, or gallons using inner diameter and length for accurate results.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[184],"tags":[],"class_list":["post-2271","post","type-post","status-publish","format-standard","hentry","category-calculator"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.0 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Pipe Volume Calculator - DonHit<\/title>\n<meta name=\"description\" content=\"Pipe Volume Calculator \u2013 Quickly determine the volume of a pipe in liters, cubic meters, or gallons using inner diameter and length for accurate results.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/donhit.com\/en\/calculator\/pipe-volume\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Pipe Volume Calculator - DonHit\" \/>\n<meta property=\"og:description\" content=\"Pipe Volume Calculator \u2013 Quickly determine the volume of a pipe in liters, cubic meters, or gallons using inner diameter and length for accurate results.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/donhit.com\/en\/calculator\/pipe-volume\/\" \/>\n<meta property=\"og:site_name\" content=\"DonHit - World of Tools\" \/>\n<meta property=\"article:published_time\" content=\"2025-02-07T15:01:27+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-02-07T15:02:32+00:00\" \/>\n<meta name=\"author\" content=\"DonHit\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"DonHit\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Pipe Volume Calculator - DonHit","description":"Pipe Volume Calculator \u2013 Quickly determine the volume of a pipe in liters, cubic meters, or gallons using inner diameter and length for accurate results.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/donhit.com\/en\/calculator\/pipe-volume\/","og_locale":"en_US","og_type":"article","og_title":"Pipe Volume Calculator - DonHit","og_description":"Pipe Volume Calculator \u2013 Quickly determine the volume of a pipe in liters, cubic meters, or gallons using inner diameter and length for accurate results.","og_url":"https:\/\/donhit.com\/en\/calculator\/pipe-volume\/","og_site_name":"DonHit - World of Tools","article_published_time":"2025-02-07T15:01:27+00:00","article_modified_time":"2025-02-07T15:02:32+00:00","author":"DonHit","twitter_card":"summary_large_image","twitter_misc":{"Written by":"DonHit","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/donhit.com\/en\/calculator\/pipe-volume\/#article","isPartOf":{"@id":"https:\/\/donhit.com\/en\/calculator\/pipe-volume\/"},"author":{"name":"DonHit","@id":"https:\/\/donhit.com\/en\/#\/schema\/person\/0c6ff7dcd8ba4810c56a532f09c33148"},"headline":"Pipe Volume Calculator","datePublished":"2025-02-07T15:01:27+00:00","dateModified":"2025-02-07T15:02:32+00:00","mainEntityOfPage":{"@id":"https:\/\/donhit.com\/en\/calculator\/pipe-volume\/"},"wordCount":33,"commentCount":0,"publisher":{"@id":"https:\/\/donhit.com\/en\/#\/schema\/person\/0c6ff7dcd8ba4810c56a532f09c33148"},"articleSection":["Calculator"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/donhit.com\/en\/calculator\/pipe-volume\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/donhit.com\/en\/calculator\/pipe-volume\/","url":"https:\/\/donhit.com\/en\/calculator\/pipe-volume\/","name":"Pipe Volume Calculator - DonHit","isPartOf":{"@id":"https:\/\/donhit.com\/en\/#website"},"datePublished":"2025-02-07T15:01:27+00:00","dateModified":"2025-02-07T15:02:32+00:00","description":"Pipe Volume Calculator \u2013 Quickly determine the volume of a pipe in liters, cubic meters, or gallons using inner diameter and length for accurate results.","breadcrumb":{"@id":"https:\/\/donhit.com\/en\/calculator\/pipe-volume\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/donhit.com\/en\/calculator\/pipe-volume\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/donhit.com\/en\/calculator\/pipe-volume\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Trang ch\u1ee7","item":"https:\/\/donhit.com\/en\/"},{"@type":"ListItem","position":2,"name":"Calculator","item":"https:\/\/donhit.com\/en\/category\/calculator\/"},{"@type":"ListItem","position":3,"name":"Pipe Volume Calculator"}]},{"@type":"WebSite","@id":"https:\/\/donhit.com\/en\/#website","url":"https:\/\/donhit.com\/en\/","name":"DonHit - World of tools","description":"","publisher":{"@id":"https:\/\/donhit.com\/en\/#\/schema\/person\/0c6ff7dcd8ba4810c56a532f09c33148"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/donhit.com\/en\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/donhit.com\/en\/#\/schema\/person\/0c6ff7dcd8ba4810c56a532f09c33148","name":"DonHit","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/donhit.com\/en\/#\/schema\/person\/image\/","url":"https:\/\/donhit.com\/en\/wp-content\/uploads\/2024\/11\/logo-donhit.webp","contentUrl":"https:\/\/donhit.com\/en\/wp-content\/uploads\/2024\/11\/logo-donhit.webp","width":400,"height":267,"caption":"DonHit"},"logo":{"@id":"https:\/\/donhit.com\/en\/#\/schema\/person\/image\/"},"description":"DonHit is a website designed to provide useful tools for everyone. Its primary goal is to support and empower the community. All the tools available on the site are completely free to use.","sameAs":["https:\/\/donhit.com\/en"],"url":"https:\/\/donhit.com\/en\/author\/admin_don\/"}]}},"_links":{"self":[{"href":"https:\/\/donhit.com\/en\/wp-json\/wp\/v2\/posts\/2271","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/donhit.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/donhit.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/donhit.com\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/donhit.com\/en\/wp-json\/wp\/v2\/comments?post=2271"}],"version-history":[{"count":2,"href":"https:\/\/donhit.com\/en\/wp-json\/wp\/v2\/posts\/2271\/revisions"}],"predecessor-version":[{"id":2273,"href":"https:\/\/donhit.com\/en\/wp-json\/wp\/v2\/posts\/2271\/revisions\/2273"}],"wp:attachment":[{"href":"https:\/\/donhit.com\/en\/wp-json\/wp\/v2\/media?parent=2271"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/donhit.com\/en\/wp-json\/wp\/v2\/categories?post=2271"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/donhit.com\/en\/wp-json\/wp\/v2\/tags?post=2271"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}