你可以输入什么
下面的每个示例都于 2026 年 10 月 15 日在 Ratio 0.6 中运行。
Ratio 把每一行当作一次计算,并把答案显示在旁边。像说话一样书写数字、单位、货币和日期。它用不到的词会被直接忽略。
这里的结果采用 1,234.5 样式。在应用中则遵循你电脑的地区设置。税率和公共假日取自设置中的地区;这些示例使用德国(增值税 19%)。
基础与百分比
| 2 + 3 * 4 | 14 |
| 2^10 | 1,024 |
| sqrt(8) | 2.8284 |
| 5! | 120 |
| 1/3 + 1/4 | 7/12 |
| 20% of 150 | 30 |
| 150 + 20% | 180 |
| 150 - 10% | 135 |
| 50 is what % of 200 | 25% |
| 30 is 15% of what | 200 |
| change(80, 100) | 25% |
变量、行引用与合计
用 = 给值命名,用 L3 复用第 3 行,用 prev 复用上一行。“Rent”这类标签会被跳过,所以可以在数字旁边写备注。
| price = 1200 | 1,200 |
| discount = 15% | 15% |
| price - discount | 1,020 |
| L3 * 2 | 2,040 |
| prev / 4 | 510 |
sum 和 average 会把上面的区块相加。用带 # 的词给行打标签,即可只把这些行相加,无论它们在表格中的位置。
| Rent 1200 #home | 1,200 |
| Internet 40 #home | 40 |
| Trip 600 #travel | 600 |
| sum #home | 1,240 |
要分账,就在每个人点的东西后面加上 @ 名字。没有名字的行由该块中提到的所有人分摊。以名字开头的行显示这个人的份额,split 显示所有人的份额。更多内容见分账计算器页面。
| "Pizza" 12.50 @Ana | 12.5 |
| "Wine" 20 @Ana @Ion | 20 |
| "Bread" 3 | 3 |
| @Ion + 10% | 12.65 |
| split | Ana 24 · Ion 11.5 |
以 # 加空格开头的行是标题。“引号”中的文字是行内注释。
货币与加密货币
支持 160 多种货币和主流加密货币,Mac 上每小时刷新(以及唤醒时),Windows 和 Linux 上每隔几小时刷新。没有网络时,Ratio 使用上次下载的汇率。下面的结果来自 2026 年 10 月 15 日,会随市场变化。
| dinner = 84 eur / 3 | €28 |
| dinner in usd | $31.41 |
| 100 usd in eur | €89.14 |
| 100 EUR in RON | 533.42 RON |
| 0.5 btc in usd | $41,058.34 |
加上日期即可使用当天的欧洲央行参考汇率:
| 100 eur in usd on 1 jan 2024 | $110.50 |
Or fix a rate for every line below it, so an invoice reads the same when you open it next month:
| 1 eur = 1.08 usd | fixed rate |
| 500 eur in usd | $540.00 |
Subscriptions
Write each price per month, year, week or day: /month, a month and monthly all work. Add renews and a date to see when it next comes out of your account. subscriptions adds them up per month and per year, in the first one's currency, and names the next renewal. A price per hour is a rate of pay and is left out.
| Netflix 15.99 eur a month renews 12th | 15.99 EUR/month · 12 Nov |
| Spotify 10.99 eur monthly | 10.99 EUR/month |
| iCloud 2.99 eur/month | 2.99 EUR/month |
| Domain 18 eur per year renews 3 mar | 18 EUR/year · 3 Mar 2027 |
| subscriptions | 31.47 EUR/month · 377.64 EUR/year · next Netflix 12 Nov |
The renewal dates above are from 29 October 2026. renews 12th is the 12th of every month; a past date such as renews 3 mar 2024 moves on to the next one.
单位
支持 150 多种长度、面积、体积、质量、速度、温度、时间、数据等单位。使用 in 或 to。
| 5 km in mi | 3.11 mi |
| 6 ft in cm | 182.88 cm |
| 100 f in c | 37.78 °C |
| 3 cups in ml | 709.76 mL |
| 60 mph in km/h | 96.56 km/h |
| 20 m2 in sq ft | 215.28 ft² |
| 1 gb in mb | 1,000 MB |
| 1 gib in mib | 1,024 MiB |
| 2 h in min | 120 min |
日期、倒计时与时区
| 14 oct 2027 - 1 oct 2027 | 13 days |
| 25 dec 2026 + 3 weeks | Fri, 15 Jan 2027 |
| Easter 2027 | Sun, 28 Mar 2027 |
| Ramadan 2027 | Mon, 8 Feb 2027 |
| Chinese New Year 2027 | Sat, 6 Feb 2027 |
| Thanksgiving 2026 | Thu, 26 Nov 2026 |
| 1h:17m + 20 min | 1 h 37 min |
| today + 2 weeks | Thu, 29 Oct 2026 |
| in 3 days | Sun, 18 Oct 2026 |
| next friday | Fri, 16 Oct 2026 |
| days until christmas | 71 days |
| until Christmas | 70 days 3 h 20 min |
| 15:00 London in Tokyo | Thu 23:00 |
| now in New York | Thu 14:39 EDT |
| now in unix | 1792089588 |
以 until 开头的行是实时倒计时:表格打开期间,结果会不断减少。
工作日与假日
工作日会跳过周末和你所在地区的法定节假日。可以用 holidays = […] 这一行添加自己的休息日。
| 1 mar 2027 + 10 working days | Mon, 15 Mar 2027 |
| workdays between 1 mar 2027 and 31 mar 2027 | 21 |
| working days in march 2027 | 21 |
| holidays = [24 dec, 31 dec] | |
| 20 dec 2027 + 5 working days | Mon, 27 Dec 2027 |
增值税、利润率与取整
VAT 是你所在地区的标准税率。TVA、MwSt、IVA、GST 和 tax 同样可用,也可以在词后面写上税率。
| 1000 + VAT | 1,190 |
| 1190 without VAT | 1,000 |
| VAT in 1190 | 190 |
| 1000 + VAT 9% | 1,090 |
| 80 + 25% margin | 106.6667 |
| margin(80, 100) | 20% |
| markup(80, 100) | 25% |
| 2.675 to 2 decimals | 2.68 |
| 12.37 to nearest 0.05 | 12.35 |
贷款与利息
口语写法,以及电子表格函数 pmt、fv、pv、npv 和 irr。
| 10k at 4% for 5 years | 12,166.529 |
| 5000 at 7% for 3 years compounded monthly | 6,164.6279 |
| loan 200k at 5% for 30 years | 1,073.6432 |
| pmt(5%/12, 360, 200000) | 1,073.6432 |
| npv(10%, 100, 200, 300) | 481.5928 |
| irr(-1000, 300, 400, 500) | 8.8963% |
| amortize 200k at 5% for 30 years | 1,073.6432 |
| save 500/month at 7% for 20 years | 260,463.3299 |
| cagr(1000, 2500, 5 years) | 20.1124% |
| roi(1000, 1500) | 50% |
| 5% minus 3% inflation | 1.9417% |
| fire 40k/year | 1,000,000 |
| break even fixed 5000, price 50, cost 30 | 250 |
| depreciate 10000 over 5 years | 2,000 |
| ddb(10000, 1000, 5, 1) | 4,000 |
amortize 显示每期还款额,悬停后可以看到每年的利息、本金和余额。save 累计定期存款;sln、ddb 和 syd 是电子表格中的折旧函数。
工资与自由职业
到手工资使用 2026 年的规则:罗马尼亚和波兰按月计算(罗马尼亚:CAS、CASS、个人扣除、10% 所得税;波兰:ZUS、医保、PIT,不含 PPK),德国(税级 I、无子女、无教会税;近似值)、法国(私营部门雇员,一份额)、英国(苏格兰除外)、爱尔兰(单身,USC 和 PRSI)和美国(单身申报,仅联邦税)按年计算。悬停在结果上可查看每项扣除。国家来自 in RO、in DE、in UK、in US、in PL、in IE 或 in FR,来自货币(lei、zł、£、$),或来自你的地区。in hourly 和 in daily 按你所在地区今年的工作日数相除,每天 8 小时。
| 5000 gross in RO | 2,981 |
| 3000 net in gross in RO | 5,036 |
| 60000 gross in DE | 37,622 |
| 50000 gross in UK | 39,519.6 |
| 100000 gross in US | 79,180 |
| 5000 eur/month in yearly | 60,000 EUR/year |
| 1 mar 2027 net 30 | Wed, 31 Mar 2027 |
| late fee 1000 at 0.1%/day for 45 days | 45 |
| 9:15–17:40 - 45 min | 7 h 40 min |
方程与微积分
| solve 2x + 3 = 11 | x = 4 |
| solve x^2 - 5x + 6 = 0 | x = 2 or x = 3 |
| solve cos(x) = x | x ≈ 0.7391 |
| integral(x^2, 0, 3) | 9 |
| derivative(x^3, 2) | 12 |
plot sin(x) 或 plot x^2 from -2 to 2 会在表格里画出一个小图表。
统计、质数、复数与常数
| mean(1, 2, 3, 4) | 2.5 |
| median(1, 3, 2) | 2 |
| stdev(2, 4, 4, 4, 5, 5, 7, 9) | 2.1381 |
| percentile([3, 7, 9, 12], 90) | 11.1 |
| sum([120, 340, 89]) | 549 |
| isprime(91) | not prime: 7 × 13 |
| isprime(97) | prime |
| is 59 prime | prime |
| standard deviation of 20, 30 and 40 | 10 |
| max of 3 and 4 | 4 |
| time to double at 12% | 6.12 years |
| years from $100 to $200 at 7% growth every year | 10.24 years |
| 100² | 10,000 |
| (3 + 4i) * (1 - 2i) | 11 - 2i |
| sqrt(-4) | 2i |
| c | 299,792,458 m/s |
开发者数学
| 255 in hex | 0xFF |
| 10 in binary | 0b1010 |
| 255 in bin 8 bits | 0b11111111 |
| -1 in hex u8 | 0xFF |
| 300 in u8 | 44 |
| 0xF0 & 0x3C | 0x30 |
| 1 << 4 | 16 |
| #FF8800 in rgb | rgb(255, 136, 0) |
| #FF8800 in hsl | hsl(32, 100%, 50%) |
| chmod 755 | rwxr-xr-x |
| 1920x1080 aspect | 16:9 |
| 99.9% uptime | 43 min 50 s |
| U+1F600 | 😀 U+1F600 |
| 192.168.1.0/24 | 192.168.1.0 – 192.168.1.255 |
| 10.0.0.5 in 10.0.0.0/8 | yes |
| /24 mask | 255.255.255.0 |
| base64 "hello" | aGVsbG8= |
| decode base64 aGVsbG8= | hello |
| urlencode "a b&c" | a%20b%26c |
| sha256 "abc" | ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad |
| uuid | 9b2c7e04-5f1a-4d3e-8c6b-2a7f0e9d1c35 |
| 5 GB at 100 Mbps | 6 min 40 s |
| 1 TB / 3 h in MB/s | 92.59 MB/s |
| 1.2M tokens at $3/M | $3.60 |
| $0.0832/h for 30 days | $59.90 |
md5、sha1 和 urlencode/urldecode 用法相同,引号可加可不加。uuid 会生成一个新的随机 UUID,在你编辑时保持不变。at 用数据量除以速度,并用数量或时间乘以单价:$3/M 表示每百万 3 美元。
科学与工程
| 12 V / 4 ohm | 3 A |
| 10k || 4.7k | 3,197.2789 |
| brown black red gold | 1 kΩ ±5% |
| 4.7k in colors | yellow violet red |
| molar mass H2SO4 | 98.072 g/mol |
| 10 g H2O in mol | 0.5551 mol |
| det([[1,2],[3,4]]) | -2 |
| inverse([[1,2],[3,4]]) | [[-2, 1], [1.5, -0.5]] |
| dot([1,2,3],[4,5,6]) | 32 |
| grades 9 x3, 7 x2 | 8.2 |
| 1234.5 to 3 sig figs | 1,230 |
| 4700 ohm in eng | 4.7 kΩ |
矩阵还支持 transpose、trace 和乘积;cross 和 norm 用于向量。hr zones age 30 给出心率区间,jet lag London to Tokyo 给出时差。
健康、家居和旅行
| bmi(80 kg, 180 cm) | 24.7 |
| bmr 80 kg 180 cm 30 years male | 1,780 kcal |
| pace 5 km in 27 min | 5:24 /km · 8:41 /mi |
| race 10 km in 50 min to marathon | 3:50:01 |
| distance between Paris and Rome | 1,105 km |
| daylight hours in Reykjavik on Jun 21 | 21 h 8 min |
| 1 cm in px @ 326 ppi | 128.35 px |
| ppi of 15 inch screen at 2880x1864 | 229 ppi |
| paint 40 m2 2 coats | 8 L |
| tiles 12 m2 | 13.2 m² |
| concrete 2 m3 | 184 |
| mortgage 300k with 20% down at 5% for 30 years | 1,288.3719 |
| 6.5 l/100km in mpg | 36.19 mpg |
| 450 km at 6.5 l/100km | 29.25 L |
自定义函数
函数只需定义一次,之后在所有表里都能用。forget f 会删除它。
| f(x) = x * 1.19 | |
| f(100) | 119 |
| area(w, h) = w * h | |
| area(3 m, 4 m) | 12 m² |
其他语言
除英语外,Ratio 还理解罗马尼亚语、德语、法语、西班牙语、意大利语、日语、中文和韩语的关键词,并且可以在同一张表里混用。日语、中文和韩语不需要空格:100ドルを円に、100美元换成人民币 和 100달러를 원으로 都能用,万、億、만 和 억 会乘以它前面的数字。
| 5 km în mile | 3.11 mi |
| 1000 + TVA | 1,190 |
| 1000 + MwSt | 1,190 |
在终端中
ratio 命令使用与应用相同的引擎。
ratio "5 km in mi" 3.11 mi ratio 20% of 150 30 cat budget.txt | ratio -t line = result, then the total ratio --region FR "1000 + VAT"
其他选项:--json、--csv、--explain、--vat N、--fetch。运行 ratio --help 查看完整列表。
在 Claude 和其他 AI 助手中
ratio mcp 把 Ratio 作为 MCP 服务器运行,让 Claude 用 Ratio 计算货币、股价、单位、工作日、增值税和税后工资,而不是靠猜。它有两个工具:用于单行的 calculate,以及用于相互引用的多行的 calculate_sheet。仅限 Mac,需要本网站的 Ratio。
在 Claude Code 中:
claude mcp add --scope user ratio -- /Applications/Ratio.app/Contents/Helpers/ratio mcp
在 Claude Desktop 中,打开 Settings › Developer › Edit Config,把下面内容加到 mcpServers 里,然后退出并重新打开 Claude:
"ratio": {
"command": "/Applications/Ratio.app/Contents/Helpers/ratio",
"args": ["mcp"]
}
Cursor、VS Code 等:计算器 MCP 服务器页面。
常见问题
如何在 Mac 或 PC 上计算增值税? 输入 1000 + VAT 加上税额,输入 1190 without VAT 去掉税额,输入 VAT in 1190 则只看税额。
货币可以离线使用吗? 可以,使用 Ratio 上次下载的汇率。联网时每小时刷新一次。
如果某一行没有结果怎么办? Ratio 对无法计算的文字会留空,而不是瞎猜。检查单位和货币代码的拼写,或把鼠标悬停在结果上查看推导过程。
如何在 Mac 或 PC 上计算两个日期之间的工作日?输入 workdays between 1 mar 2027 and 31 mar 2027(在德国为 21 天)或 1 mar 2027 + 10 working days(Mon, 15 Mar 2027)。Ratio 会跳过周末和你所在地区的公共假日。
如何在 Mac 或 PC 上不用浏览器换算货币?在 Ratio 中输入 100 usd in eur。160 多种货币和主流加密货币的汇率每小时更新,离线也能使用。加上 on 1 jan 2024 可查看过去某天的汇率。
Ratio 能解方程吗?能。solve x^2 - 5x + 6 = 0 得到 x = 2 或 x = 3,solve cos(x) = x 得到 x ≈ 0.7391。integral(x^2, 0, 3) 得到 9。