<?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: Asghar Ali</title>
    <description>The latest articles on DEV Community by Asghar Ali (@asghar_ali_3b49d970a8bba8).</description>
    <link>https://dev.to/asghar_ali_3b49d970a8bba8</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%2F4259790%2F442c576a-7d44-4374-8839-5e07545a8f23.png</url>
      <title>DEV Community: Asghar Ali</title>
      <link>https://dev.to/asghar_ali_3b49d970a8bba8</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/asghar_ali_3b49d970a8bba8"/>
    <language>en</language>
    <item>
      <title>How I Built a Rent-Cap Calculator That Handles California, Washington and Oregon Rules</title>
      <dc:creator>Asghar Ali</dc:creator>
      <pubDate>Mon, 23 Nov 2026 05:49:30 +0000</pubDate>
      <link>https://dev.to/asghar_ali_3b49d970a8bba8/how-i-built-a-rent-cap-calculator-that-handles-california-washington-and-oregon-rules-36i1</link>
      <guid>https://dev.to/asghar_ali_3b49d970a8bba8/how-i-built-a-rent-cap-calculator-that-handles-california-washington-and-oregon-rules-36i1</guid>
      <description>&lt;p&gt;I build small, free, client-side calculators for US landlords and renters. The hardest one so far is not the maths — it is the rules. A rent increase that is legal in one state can be illegal in another, and in California the answer changes by county. Here is how the calculator handles that, and the design decisions that fell out of it.&lt;/p&gt;

&lt;h3&gt;
  
  
  The problem: one percentage does not fit
&lt;/h3&gt;

&lt;p&gt;A rent-increase percentage is easy: new rent minus old rent, divided by old rent. A $1,800 rent going to $1,950 is $150, or 8.33%. The hard part is whether 8.33% is allowed. That depends on the state, the county, the date the increase starts, and in Washington, how long the tenancy has run.&lt;/p&gt;

&lt;p&gt;California groups its counties. For increases starting 1 August 2026 to 31 July 2027, the caps are: Los Angeles area 8.7%, Riverside 8.1%, San Diego 8.2%, San Francisco 8.8%, and all other counties 8.6%. Same state, five different answers — so the calculator asks for the county first and looks the group up, instead of asking the user to know which group they are in.&lt;/p&gt;

&lt;p&gt;Washington is simpler on the surface and stricter underneath: 9.683% for 2026 and 10% for 2027, but no increase at all during the first 12 months after a tenancy begins. Oregon is 9.5% for 2026 and 10% for 2027 for general tenancies. Every one of those figures is a verified cap for a specific period, not a typical rate, so the calculator stores them as dated data — state, period, cap — and refuses to answer for a date outside the periods it actually knows. Guessing a cap would be worse than saying "I don't know".&lt;/p&gt;

&lt;h3&gt;
  
  
  Decision 1: data tables, not formulas
&lt;/h3&gt;

&lt;p&gt;The caps above cannot be derived from a formula. They come from statutes and state-agency publications, and they change every year. So the code keeps them in a plain table keyed by state and period, and the calculation is a lookup followed by a comparison. When a new year's figures are published, only the table changes. That also makes the figures auditable: each value can be checked against its source without reading any logic.&lt;/p&gt;

&lt;h3&gt;
  
  
  Decision 2: say what the tool does not do
&lt;/h3&gt;

&lt;p&gt;A calculator that answers everything invites trust it has not earned. This one compares a proposed increase with the verified state cap only. It does not give notice periods, because those were not verified to the same standard, and it does not compute tax or legal outcomes. Where a rule is unverified, the tool points at the official source instead of inventing an answer. That restraint is a feature, not a gap — a wrong legal number is worse than no number.&lt;/p&gt;

&lt;h3&gt;
  
  
  Decision 3: show the worked example
&lt;/h3&gt;

&lt;p&gt;Rent maths is easy to distrust when only a result appears. So the calculators show their working. Prorated rent is the clearest example: $1,800 rent, move-in on October 16 in a 31-day month, gives three different answers depending on the method — $929.03 by actual days, $960.00 by the 30-day method, and $946.85 by the 365-day method. Same rent, same move-in date, about $31 apart. Showing all three, with the arithmetic visible, lets the user compare them with what their lease says instead of taking one number on faith. The rent-cap checker does the same: it shows the cap it used and the period it applies to, next to the verdict.&lt;/p&gt;

&lt;h3&gt;
  
  
  Decision 4: client-side only, no accounts
&lt;/h3&gt;

&lt;p&gt;The whole site is static: no backend, no database, no logins, no user data. That is a deliberate constraint. It keeps the tools free and fast, and it removes an entire class of failure — there is nothing to breach and no account to lose. The trade-off is that nothing is saved between visits, which is fine for a calculator: the user brings their numbers, gets an answer, and leaves.&lt;/p&gt;

&lt;h3&gt;
  
  
  What I would do differently
&lt;/h3&gt;

&lt;p&gt;The first version tried to cover too many states at once. Narrowing to the states with verified figures — California, Washington, Oregon, plus Texas for deposit deadlines — made the tool honest. The lesson generalises: for a rules-driven tool, coverage you can verify beats coverage you can only claim. The next state gets added only when its figures are verified the same way.&lt;/p&gt;

&lt;p&gt;If you want to check your own increase against the verified caps, the free checker is here: &lt;a href="https://www.usrenttools.com/tools/rent-increase-legality-checker.html" rel="noopener noreferrer"&gt;https://www.usrenttools.com/tools/rent-increase-legality-checker.html&lt;/a&gt; — it compares a proposed increase with the state cap only, and shows the cap and period it used.&lt;/p&gt;

&lt;p&gt;This is general information, not legal advice. Rules differ by city and state, and your lease governs what you are asked to pay, so check the official source for where you live before you act on a number.&lt;/p&gt;

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