Calculate precise soap making lye amounts based on purity percentages. Ensure safe, balanced saponification with our easy-to-use lye adjustment tool.
AI Generation Prompt
Technical Specification: Lye Purity Formulation Adjuster
Overview
A clean, single-page, responsive web tool that allows soap makers to adjust their lye (NaOH or KOH) requirements based on the purity percentage of their raw ingredients. The application focuses on preventing lye-heavy or fat-heavy soap batches.
Core Features
- Purity Adjustment Engine: A real-time calculation system that takes the "Pure Lye Required" and "Purity Percentage" to output the "Adjusted Lye Mass" required.
- Compound Selector: Toggle between Sodium Hydroxide (NaOH) and Potassium Hydroxide (KOH).
- Instant Error Handling: Visual feedback if input values are mathematically impossible (e.g., 0% purity or negative mass).
- Responsive UI: A mobile-first design that adapts seamlessly to desktop and tablet.
- In-Memory Operation: Zero reliance on external databases or browser storage; all calculations are stateless and ephemeral.
User Interface Design
- Layout:
- Header: Clean, centered title with a brief, supportive instruction sub-header.
- Input Card: A prominent, white-background card with soft shadows containing input fields for:
- Target Lye Weight (grams)
- Lye Purity Percentage (0.01 - 100%)
- Compound Type Selection (Select/Radio buttons)
- Results Section: A dynamically updating display card that clearly shows the adjusted weight, highlighted in a professional, high-contrast color.
- Typography: Clean, sans-serif font stack (e.g., Inter, system-ui).
- Visual Aesthetic: Light, airy aesthetic. Use whitespace effectively to guide the user's eye. No dark mode. Primary colors: Sage Green (#4A7C59) for actions, Slate Gray (#475569) for text.
Animations & Transitions
- Micro-interactions: Subtle scale-up animation on text input focus.
- Transition: Smooth opacity fade-in for the calculation result when values change.
- Feedback: A slight shake animation for error states if invalid data is entered.
Technical Constraints & Directives
- Single File: All HTML, CSS (Tailwind CDN), and JS must be embedded in one
.htmlfile. - Browser Storage: ABSOLUTELY NO usage of
localStorage,sessionStorage, or cookies. The state must live entirely within JavaScript variables. - No Popups: Do not use
alert(),prompt(), orconfirm(). Any necessary validation messages must be rendered as DOM elements within the flow of the document. - External Links: Must use
target="_blank" rel="noopener noreferrer". - Security: The application is intended to run in a sandboxed iframe. Ensure no
eval()calls or insecure inline scripts.
Spread the word
Files being used
Frequently Asked Questions
Everything you need to know about using this application.
Why is lye purity important in soap making?
Soap making relies on precise stoichiometry to ensure all fats and oils are fully saponified. If your lye isn't 100% pure, using the standard recipe amount can lead to an excess of fats (superfatting) or, more dangerously, an excess of lye in the final product. Calculating based on your lye's specific purity percentage allows you to adjust the weight of the lye added to the mixture. This adjustment prevents "lye-heavy" soap which can be caustic and harsh on the skin, ensuring a safe and balanced bar every time you craft.
How do I calculate lye weight with purity percentages?
To adjust for purity, divide the required 100% pure lye weight by the purity percentage of your current lye supply (expressed as a decimal). For example, if you need 100 grams of pure NaOH and your lye is 95% pure, divide 100 by 0.95 to get 105.26 grams of the impure lye. Our tool automates this calculation for both Sodium Hydroxide (NaOH) and Potassium Hydroxide (KOH). By inputting your target amount and the purity label from your lye packaging, the calculator provides the exact mass required for your specific formulation.
Is this tool compatible with all soap making methods?
This calculator is designed for the Cold Process and Hot Process soap making methods where precise lye calculations are critical. It focuses specifically on the chemical correction of the lye weight based on purity, which applies regardless of the oils or fats used in your recipe. Please note that this tool assumes you are already using a reliable soap calculator to determine the base lye amount required for your specific oil mixture. This tool serves as a secondary adjustment layer to ensure the quality of your raw materials matches your recipe requirements.
What should I do if my lye purity is unknown?
If the purity of your lye is unknown, it is highly recommended to contact the supplier or check the technical data sheet for the product. Using lye of an unknown purity can lead to inconsistent and unsafe soap batches that may be caustic or unusable. We strongly advise against guessing the purity percentage. For the safest results in soap making, always source high-grade lye from reputable suppliers who provide a certificate of analysis or clear percentage specifications on the packaging.



