<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Trade Pricing Control</title>
    <description>The latest articles on DEV Community by Trade Pricing Control (@tradepricingcontrol).</description>
    <link>https://dev.to/tradepricingcontrol</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4263660%2F3ede49df-33ed-4196-bb27-8de3316862f6.png</url>
      <title>DEV Community: Trade Pricing Control</title>
      <link>https://dev.to/tradepricingcontrol</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/tradepricingcontrol"/>
    <language>en</language>
    <item>
      <title>How I built 30 pricing calculators as plain static HTML (no framework, no backend)</title>
      <dc:creator>Trade Pricing Control</dc:creator>
      <pubDate>Wed, 25 Nov 2026 01:57:15 +0000</pubDate>
      <link>https://dev.to/tradepricingcontrol/how-i-built-30-pricing-calculators-as-plain-static-html-no-framework-no-backend-2cbi</link>
      <guid>https://dev.to/tradepricingcontrol/how-i-built-30-pricing-calculators-as-plain-static-html-no-framework-no-backend-2cbi</guid>
      <description>&lt;p&gt;Trade Pricing Control (&lt;a href="https://tradepricingcontrol.com/" rel="noopener noreferrer"&gt;https://tradepricingcontrol.com/&lt;/a&gt;) is a set of free calculators that help small home service businesses quote jobs: window cleaning, pressure washing, junk removal, house cleaning and about 25 more. All of it is static HTML, CSS and vanilla JavaScript on a shared host behind Cloudflare. There is no build framework, no database and no API. Here is how it works and why I kept it that simple.&lt;/p&gt;

&lt;h2&gt;
  
  
  One engine, many calculators
&lt;/h2&gt;

&lt;p&gt;Every calculator page has a container like &lt;code&gt;&amp;lt;div data-calc="window-pricing"&amp;gt;&lt;/code&gt; and loads a single shared script, &lt;code&gt;calc.js&lt;/code&gt;. The script looks up a definition object by that key and renders the form, the line items and the totals.&lt;/p&gt;

&lt;p&gt;A definition is mostly data:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="no"&gt;CALCS&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"window-pricing"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="n"&gt;title&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"Window cleaning quote"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="n"&gt;owner&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;              &lt;span class="c1"&gt;// business view: adds an hourly-rate check&lt;/span&gt;
  &lt;span class="n"&gt;presets&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
    &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"Small home"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;std&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;pic&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;door&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;screens&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="c1"&gt;// ...&lt;/span&gt;
  &lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="c1"&gt;// each rate is a [low, high] range from a published 2026 cost guide&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Adding a new trade means writing one more object and one more HTML page. The engine handles the rest: inputs, presets, formatting and the result card.&lt;/p&gt;

&lt;h2&gt;
  
  
  Three price levels from one range
&lt;/h2&gt;

&lt;p&gt;Each rate is stored as a low and high number from a published source. A small helper turns that into three levels:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;mid&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;b&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;a&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;b&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;b&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="no"&gt;TIERS&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"Budget"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"Typical"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"Premium"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Budget uses the low end, Typical the midpoint and Premium the high end. A slider moves every line item together anywhere between low and high, so you can match your own market instead of trusting a single national number.&lt;/p&gt;

&lt;p&gt;Two more rules make the numbers realistic:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Minimums.&lt;/strong&gt; If a source reports a typical minimum job charge, small jobs get raised to it.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Your own surcharges.&lt;/strong&gt; Access, height and condition are left to the user, because they depend on your own costs.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The business calculators also divide the quote by the hours you enter, so you can see your effective hourly rate before you send the price.&lt;/p&gt;

&lt;h2&gt;
  
  
  "Save as PDF" without a PDF library
&lt;/h2&gt;

&lt;p&gt;There's no jsPDF or html2pdf. The quote button adds a class to &lt;code&gt;&amp;lt;body&amp;gt;&lt;/code&gt; and calls the browser's own print dialog:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;body&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;classList&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;add&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"printing-quote"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nb"&gt;window&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;addEventListener&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"afterprint"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;done&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nb"&gt;window&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A print stylesheet hides everything except the quote, and the user picks "Save as PDF". It weighs nothing, works offline and looks the same in every browser.&lt;/p&gt;

&lt;h2&gt;
  
  
  Embeddable with one query parameter
&lt;/h2&gt;

&lt;p&gt;Any calculator can run inside someone else's site. Each page shows a ready-to-copy iframe snippet, and the iframe loads the page with &lt;code&gt;?embed=1&lt;/code&gt;. A small &lt;code&gt;embed.js&lt;/code&gt; sees that parameter and strips the page down to just the calculator.&lt;/p&gt;

&lt;h2&gt;
  
  
  Printable price lists
&lt;/h2&gt;

&lt;p&gt;The site also has editable price list templates (for example &lt;a href="https://tradepricingcontrol.com/price-lists/window-cleaning/" rel="noopener noreferrer"&gt;https://tradepricingcontrol.com/price-lists/window-cleaning/&lt;/a&gt;). You type your business name and prices into the page and print it. Same trick: plain HTML plus a print stylesheet.&lt;/p&gt;

&lt;h2&gt;
  
  
  Sources, listed on every page
&lt;/h2&gt;

&lt;p&gt;Every rate comes from a published 2026 US cost guide, and the sources are listed under each calculator. The assumptions I had to make, like estimating window count from home size, are written out on the methodology page: &lt;a href="https://tradepricingcontrol.com/methodology/" rel="noopener noreferrer"&gt;https://tradepricingcontrol.com/methodology/&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Why static?
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Speed.&lt;/strong&gt; Pages are a single HTML file plus one shared script, cached by Cloudflare.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Nothing to break.&lt;/strong&gt; No server code, no dependencies to update and no database to back up.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cheap.&lt;/strong&gt; It runs on basic shared hosting.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The tradeoff is that adding a calculator means editing files by hand, but with one engine and data-only definitions that takes minutes.&lt;/p&gt;

&lt;p&gt;If you run a service business, or you're building something similar, the calculators are free to use and embed: &lt;a href="https://tradepricingcontrol.com/" rel="noopener noreferrer"&gt;https://tradepricingcontrol.com/&lt;/a&gt;&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>webdev</category>
      <category>showdev</category>
      <category>html</category>
    </item>
  </channel>
</rss>
