Ratio Calculator
Free to download on every platform. Comes pre-installed on BotFone, BotPad and BotFlip — with extra free apps included.
About this app
WHAT IT DOES
Ratio Calculator is a floating panel that simplifies ratios, finds missing values, and visualizes proportional relationships. Enter two numbers (A and B) to simplify the ratio A:B, or enter two pairs (A:B and C:D) to compare them and check equivalence. The panel instantly displays the simplified ratio, the equivalent decimal value, and a visual bar representation showing the proportional split. A "Find missing value" mode lets you enter any three of the four values (A, B, C, or D) and the panel automatically calculates the missing fourth using cross‑multiplication—perfect for solving proportion problems. You can insert the simplified ratio or decimal value directly into any editable field on the page (input, textarea, or contenteditable) with one click, or copy all results to your clipboard. Ideal for students learning proportions, professionals scaling recipes or designs, or anyone working with ratios in daily life.
WHERE IT RUNS
The panel overlays any website that loads the BotGentz extension—whether you're on a math homework page, a design tool, a recipe site, a spreadsheet, or any other web page. It works on all modern Chromium‑based browsers (Chrome, Edge, Brave, Arc) and Firefox. The script injects a self‑contained UI element that does not interfere with the host page's layout, styles, or JavaScript execution. It runs client‑side only, with no external API calls or cloud dependencies.
HOW TO USE
After installing the free BotGentz extension, visit any page and click the extension icon to activate the panel. The first time you use Ratio Calculator, it will appear as a draggable widget near the bottom‑right corner of your viewport. To use the panel:
- Enter values in the A and B fields to see the simplified ratio, decimal equivalent, and visual bar.
- Enter values in C and D as well to compare two ratios—the panel will show if they are equivalent.
- Toggle "Find missing value" mode, then leave exactly one of the four fields empty. The panel will solve for the missing value when the other three are filled.
- The panel updates all calculations live as you type.
To use the results:
- Click "Insert Simplified Ratio" to paste the simplified ratio (e.g., "2:3") into the focused editable field.
- Click "Insert Decimal Value" to paste the decimal equivalent (e.g., "0.6667") into the focused field.
- Click "Copy All Results" to copy the ratio, decimal, visual representation, and comparison result to your clipboard.
The panel remembers your last entered values across sessions.
CROSS‑MULTIPLICATION ENGINE WITH AUTOMATIC DETECTION AND VISUALIZATION
Unlike basic ratio simplifiers that only reduce fractions, this panel uses a dual‑mode engine that automatically detects whether the user is simplifying a single ratio or comparing two ratios. In normal mode, the engine computes the greatest common divisor (GCD) via the Euclidean algorithm to simplify A:B to its lowest terms, calculates the decimal equivalent with four‑digit precision, and renders a proportional bar chart using the ratio parts. In missing‑value mode, the engine applies cross‑multiplication: given A, B, C, and D where exactly one is empty (NaN or zero), it solves A/B = C/D by rearranging the equation to isolate the unknown variable. For example, if D is missing, D = (B × C) / A. The engine also includes a validity check that prevents division by zero and handles edge cases like zero ratios. The visual bar is generated as a simple SVG‑like inline representation that scales proportionally—when one part is zero, the bar shows a flat line; when both parts are equal, the bar is split 50/50. This provides an immediate intuitive understanding of the ratio's balance.
THE PANEL
- Drag: Click and hold the panel's header bar to move it anywhere on the screen.
- Per‑site position: The panel stores its last position separately for each domain (e.g., different positions for Khan Academy vs. Google Sheets) using the browser's localStorage, keyed by hostname.
- Snap: When dragged near any edge of the viewport, the panel snaps to that edge with a 16px margin for a clean, docked feel.
- Collapse: Click the "−" button in the header to collapse the panel to a compact title bar, preserving all current values. Click "+" to expand it back.
- Resize: Drag the bottom‑right corner handle to resize the panel from 280px to 600px wide and 200px to 500px tall; the layout adapts responsively.
- Escape: Press the Escape key while the panel is focused to close it entirely (you can reopen it from the extension toolbar).
PLEASE NOTE
This script requires the free BotGentz extension to run—it is not a standalone bookmarklet or user script. Websites frequently update their DOM structures and security policies; while we strive to keep the panel functional across thousands of sites, occasional updates may be needed. The calculator performs all operations entirely in your browser—no data is sent to any server, and no cookies or tracking identifiers are used. Your ratio values remain private to your local session and are persisted only via GM_setValue (the extension's local storage) for convenience, not shared across devices or sessions. When using missing‑value mode, ensure exactly one field is empty—the panel will not solve if zero or more than one field is missing. All results are rounded to four decimal places where applicable; for precise work, verify critical calculations independently.